Blob Blame History Raw
From: Ilya Dryomov <idryomov@gmail.com>
Date: Fri, 30 Aug 2019 17:38:31 +0200
Subject: libceph: directly skip to the end of redirect reply
Git-commit: bb0e681dda33adac516dd74723b757c5c2feafe6
Patch-mainline: v5.7-rc1
References: jsc#SES-1134

Coverity complains about a double write to *p.  Don't bother with
osd_instructions and directly skip to the end of redirect reply.

Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Acked-by: Luis Henriques <lhenriques@suse.com>
---
 net/ceph/osd_client.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index f9ec6a6568bd..998e26b75a78 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -3483,9 +3483,6 @@ static int ceph_redirect_decode(void **p, void *end,
 		goto e_inval;
 	}
 
-	len = ceph_decode_32(p);
-	*p += len; /* skip osd_instructions */
-
 	/* skip the rest */
 	*p = struct_end;
 out: