yeahuh / rpms / qemu-kvm

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