summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2014-02-03 17:49:51 +0530
committerVijay Bellur <vbellur@redhat.com>2014-02-05 21:44:26 -0800
commitd0574d040b3d7f54ddafa0b768ddfc1e7f247536 (patch)
tree9b29b33d10e1e31150b362afbcc5d76d91470d4e
parentb187d3b5231406b524bf73b45f76e001692e282e (diff)
Problem : getfattr fails and mount point becomes inaccessible while
fetching glusterfs.ancestry.path key value for a gfid from aux-gfid-mount based mount point. Analysis : The caller of posix_make_ancestryfromgfid() function i.e. posix_get_ancestry_non_directory() is sending an incorrect type value as an argument leading to a crash in posix_make_ancestral_node() (head dirent pointer is NULL and an attempt to dereference causes seg fault). For a non directory operation this piece of code should not have been executed but due to incorrect type value this happened. Solution : In posix_make_ancestryfromgfid() call type is passed as logical or of type and POSIX_ANCESTRY_PATH instead of logical or of POSIX_ANCESTRY_PATH and POSX_ANCESTRY_DENTRY. Change-Id: Iaf844bea91396c5e2ee295d5a082998fda66f0a9 BUG: 1060104 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/6892 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/storage/posix/src/posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index c1cbc83f4fb..ba928de2af0 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3269,7 +3269,7 @@ posix_get_ancestry_non_directory (xlator_t *this, inode_t *leaf_inode,
dirpath + priv->base_path_length,
pathlen,
head,
- POSIX_ANCESTRY_PATH | POSIX_ANCESTRY_DENTRY,
+ type | POSIX_ANCESTRY_PATH,
pgfid,
handle_size,
priv->base_path,