cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

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

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