aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org> 2015-08-10 10:04:47 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org> 2015-08-10 10:04:47 -0700
commita3ca013d8824e9bcf9cd62111058e882be9b334c (patch)
treee7b065ea8c58917caddc6ccf2ba70af25c02da4d /fs
parentLinux 4.2-rc6 (diff)
parentmay_follow_link() should use nd->inode (diff)
downloadlinux-a3ca013d8824e9bcf9cd62111058e882be9b334c.tar.gz
linux-a3ca013d8824e9bcf9cd62111058e882be9b334c.tar.bz2
linux-a3ca013d8824e9bcf9cd62111058e882be9b334c.zip
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
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index fbbcf0993312..1c2105ed20c5 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -879,7 +879,7 @@ static inline int may_follow_link(struct nameidata *nd)
return 0;
/* Allowed if parent directory not sticky and world-writable. */
- parent = nd->path.dentry->d_inode;
+ parent = nd->inode;
if ((parent->i_mode & (S_ISVTX|S_IWOTH)) != (S_ISVTX|S_IWOTH))
return 0;