Skip to content

Commit a3ca013

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull RCU pathwalk fix from Al Viro: "Another racy use of nd->path.dentry in RCU mode" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: may_follow_link() should use nd->inode
2 parents f7644cb + aa65fa3 commit a3ca013

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/namei.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ static inline int may_follow_link(struct nameidata *nd)
879879
return 0;
880880

881881
/* Allowed if parent directory not sticky and world-writable. */
882-
parent = nd->path.dentry->d_inode;
882+
parent = nd->inode;
883883
if ((parent->i_mode & (S_ISVTX|S_IWOTH)) != (S_ISVTX|S_IWOTH))
884884
return 0;
885885

0 commit comments

Comments
 (0)