yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
902636
From ece7649025fbdbde48ff0b954e8ec2e42c4a8b3d Mon Sep 17 00:00:00 2001
902636
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
902636
Date: Tue, 3 Mar 2020 18:43:10 +0000
902636
Subject: [PATCH 14/18] virtiofsd: load_capng missing unlock
902636
MIME-Version: 1.0
902636
Content-Type: text/plain; charset=UTF-8
902636
Content-Transfer-Encoding: 8bit
902636
902636
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
902636
Message-id: <20200303184314.155564-4-dgilbert@redhat.com>
902636
Patchwork-id: 94126
902636
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH 3/7] virtiofsd: load_capng missing unlock
902636
Bugzilla: 1797064
902636
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
902636
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
902636
RH-Acked-by: Ján Tomko <jtomko@redhat.com>
902636
902636
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
902636
902636
Missing unlock in error path.
902636
902636
Fixes: Covertiy CID 1413123
902636
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
902636
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
902636
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
902636
(cherry picked from commit 686391112fd42c615bcc4233472887a66a9b5a4a)
902636
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
902636
---
902636
 tools/virtiofsd/passthrough_ll.c | 1 +
902636
 1 file changed, 1 insertion(+)
902636
902636
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
902636
index e6f2399..c635fc8 100644
902636
--- a/tools/virtiofsd/passthrough_ll.c
902636
+++ b/tools/virtiofsd/passthrough_ll.c
902636
@@ -232,6 +232,7 @@ static int load_capng(void)
902636
          */
902636
         cap.saved = capng_save_state();
902636
         if (!cap.saved) {
902636
+            pthread_mutex_unlock(&cap.mutex);
902636
             fuse_log(FUSE_LOG_ERR, "capng_save_state (thread)\n");
902636
             return -EINVAL;
902636
         }
902636
-- 
902636
1.8.3.1
902636