summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNithya Balachandran <nbalacha@redhat.com>2014-11-01 22:16:32 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2015-01-21 04:00:09 -0800
commit709d4712941adecdc0542672cd0cdea3b86ec729 (patch)
tree7a10c3dcabfafd38edd2b653918525b350f838fb
parent443cda365ccc92597180dac59900dd5fbda43593 (diff)
Cluster/DHT : Fixed crash due to null derefv3.6.2
A lookup on a linkto file whose trusted.glusterfs.dht.linkto xattr points to a subvol that is not part of the volume can cause the brick process to segfault due to a null dereference. Modified to check for a non-null value before attempting to access the variable. > Change-Id: Ie8f9df058f842cfc0c2b52a8f147e557677386fa > BUG: 1159571 > Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> > Reviewed-on: http://review.gluster.org/9034 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: venkatesh somyajulu <vsomyaju@redhat.com> > Reviewed-by: Vijay Bellur <vbellur@redhat.com> > Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Change-Id: I53b086289d2386d269648653629a0750baae07a4 BUG: 1184191 Reviewed-on: http://review.gluster.org/9467 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
-rw-r--r--xlators/cluster/dht/src/dht-common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 57019bb..f92b0ca 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -1239,8 +1239,9 @@ dht_lookup_everywhere_done (call_frame_t *frame, xlator_t *this)
"subvolume. But linkto points to "
"different cached subvolume (%s) "
"path %s",
- local->skip_unlink.hash_links_to->name,
- local->loc.path);
+ (local->skip_unlink.hash_links_to ?
+ local->skip_unlink.hash_links_to->name :
+ " <nil>"), local->loc.path);
if (local->skip_unlink.opend_fd_count == 0) {