thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-tools-virtiofsd-fuse_lowlevel-Fix-fuse_out_header-er.patch

ddf19c
From e483eea891139ee38138381ba6715b3a2be050cc Mon Sep 17 00:00:00 2001
ddf19c
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
ddf19c
Date: Tue, 3 Mar 2020 18:43:12 +0000
ddf19c
Subject: [PATCH 16/18] tools/virtiofsd/fuse_lowlevel: Fix
ddf19c
 fuse_out_header::error value
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-6-dgilbert@redhat.com>
ddf19c
Patchwork-id: 94128
ddf19c
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH 5/7] tools/virtiofsd/fuse_lowlevel: Fix fuse_out_header::error value
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: Philippe Mathieu-Daudé <philmd@redhat.com>
ddf19c
ddf19c
Fix warning reported by Clang static code analyzer:
ddf19c
ddf19c
    CC      tools/virtiofsd/fuse_lowlevel.o
ddf19c
  tools/virtiofsd/fuse_lowlevel.c:195:9: warning: Value stored to 'error' is never read
ddf19c
          error = -ERANGE;
ddf19c
          ^       ~~~~~~~
ddf19c
ddf19c
Fixes: 3db2876
ddf19c
Reported-by: Clang Static Analyzer
ddf19c
Reviewed-by: Ján Tomko <jtomko@redhat.com>
ddf19c
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
ddf19c
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
ddf19c
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
ddf19c
(cherry picked from commit 09c086b2a144324199f99a7d4de78c3276a486c1)
ddf19c
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ddf19c
---
ddf19c
 tools/virtiofsd/fuse_lowlevel.c | 2 +-
ddf19c
 1 file changed, 1 insertion(+), 1 deletion(-)
ddf19c
ddf19c
diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c
ddf19c
index 704c036..2dd36ec 100644
ddf19c
--- a/tools/virtiofsd/fuse_lowlevel.c
ddf19c
+++ b/tools/virtiofsd/fuse_lowlevel.c
ddf19c
@@ -192,7 +192,7 @@ int fuse_send_reply_iov_nofree(fuse_req_t req, int error, struct iovec *iov,
ddf19c
 
ddf19c
     if (error <= -1000 || error > 0) {
ddf19c
         fuse_log(FUSE_LOG_ERR, "fuse: bad error value: %i\n", error);
ddf19c
-        error = -ERANGE;
ddf19c
+        out.error = -ERANGE;
ddf19c
     }
ddf19c
 
ddf19c
     iov[0].iov_base = &out;
ddf19c
-- 
ddf19c
1.8.3.1
ddf19c