summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2015-02-26 18:10:33 -0500
committerShyamsundar Ranganathan <srangana@redhat.com>2015-03-03 10:35:35 -0800
commit863580580536654a08f1b7134066949729cc8bf5 (patch)
tree9129053a8e32604701260d90686cea5b020d2977
parentceaba0fc43efacdb5ef151b5334ad3239806e40c (diff)
cluster/dht: Fixed double UNWIND in lookup everywhere code
backport of http://review.gluster.org/#/c/8666/2 on master In dht_lookup_everywhere_done: At line 1107 we call DHT_STACK_UNWIND and in the same if condition we go ahead and call, goto unwind_hashed_and_cached; which at Line 1371 calls another UNWIND. As is obvious, higher frames could cleanup their locals and on receiving the next unwind could cause a coredump of the process. Fixed the same by calling the required return post the first unwind Change-Id: I4629680af7ebecd9828941d883e33fb6e43d9703 BUG: 1151397 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/9765 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
-rw-r--r--xlators/cluster/dht/src/dht-common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index c5105d27b91..022a1a5f25d 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -1104,11 +1104,11 @@ dht_lookup_everywhere_done (call_frame_t *frame, xlator_t *this)
local->skip_unlink.hashed_gfid)){
/*GFID different, return error*/
- DHT_STACK_UNWIND (lookup, frame, -1,
- ESTALE, NULL, NULL, NULL,
- NULL);
-
+ DHT_STACK_UNWIND (lookup, frame, -1,
+ ESTALE, NULL, NULL,
+ NULL, NULL);
+ return 0;
}
ret = dht_layout_preset (this, cached_subvol,