summaryrefslogtreecommitdiffstats
path: root/xlators/storage
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2014-02-03 17:49:51 +0530
committerVijay Bellur <vbellur@redhat.com>2014-02-07 02:45:21 -0800
commit095f62a963e9768a17e7b7382967f2e30f3879a8 (patch)
tree174ef7ee827b2f6d0b483b16950f5d456a240855 /xlators/storage
parent692202e1ef7a5d009970e96e4933edb3231716b5 (diff)
POSIX : gefattr fails and mount point become inaccessible
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. Please note this patch is backport picked up from following patch: http://review.gluster.org/#/c/6892/ 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> Reviewed-on: http://review.gluster.org/6921
Diffstat (limited to 'xlators/storage')
-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 eae299763bb..2abe9283513 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3276,7 +3276,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,