|
|
e3c68b |
From 45c9eeb5544738d4d1d0aefb8a7f61e5d8859ad8 Mon Sep 17 00:00:00 2001
|
|
|
e3c68b |
From: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
e3c68b |
Date: Tue, 12 Mar 2019 18:00:37 +0530
|
|
|
e3c68b |
Subject: [PATCH 103/124] dht: NULL check before setting error flag
|
|
|
e3c68b |
|
|
|
e3c68b |
Function dht_common_mark_mdsxattr blindly setting value for
|
|
|
e3c68b |
an integer pointer without validating it. In fact there are
|
|
|
e3c68b |
two callers of this function that passes NULL value to the
|
|
|
e3c68b |
same pointer which leads to a crash.
|
|
|
e3c68b |
|
|
|
e3c68b |
Backport of : https://review.gluster.org/#/c/22345/
|
|
|
e3c68b |
|
|
|
e3c68b |
>Change-Id: Id94ffe216f6a21f007b3291bff0b1e1c1989075c
|
|
|
e3c68b |
>fixes: bz#1687811
|
|
|
e3c68b |
>Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
e3c68b |
|
|
|
e3c68b |
Change-Id: Id9785c16184fd80e8184e5ae135fb63bf44692cd
|
|
|
e3c68b |
BUG: 1471742
|
|
|
e3c68b |
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
e3c68b |
Reviewed-on: https://code.engineering.redhat.com/gerrit/167846
|
|
|
e3c68b |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
e3c68b |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
e3c68b |
---
|
|
|
e3c68b |
xlators/cluster/dht/src/dht-common.c | 3 ++-
|
|
|
e3c68b |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
e3c68b |
|
|
|
e3c68b |
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
|
|
|
e3c68b |
index 367548f..2a68193 100644
|
|
|
e3c68b |
--- a/xlators/cluster/dht/src/dht-common.c
|
|
|
e3c68b |
+++ b/xlators/cluster/dht/src/dht-common.c
|
|
|
e3c68b |
@@ -852,7 +852,8 @@ dht_common_mark_mdsxattr(call_frame_t *frame, int *errst,
|
|
|
e3c68b |
"Failed to get hashed subvol for path %s"
|
|
|
e3c68b |
"gfid is %s ",
|
|
|
e3c68b |
local->loc.path, gfid_local);
|
|
|
e3c68b |
- (*errst) = 1;
|
|
|
e3c68b |
+ if (errst)
|
|
|
e3c68b |
+ (*errst) = 1;
|
|
|
e3c68b |
ret = -1;
|
|
|
e3c68b |
goto out;
|
|
|
e3c68b |
}
|
|
|
e3c68b |
--
|
|
|
e3c68b |
1.8.3.1
|
|
|
e3c68b |
|