diff options
author | 2015-08-10 10:04:47 -0700 | |
---|---|---|
committer | 2015-08-10 10:04:47 -0700 | |
commit | a3ca013d8824e9bcf9cd62111058e882be9b334c (patch) | |
tree | e7b065ea8c58917caddc6ccf2ba70af25c02da4d /fs | |
parent | Linux 4.2-rc6 (diff) | |
parent | may_follow_link() should use nd->inode (diff) | |
download | linux-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.c | 2 |
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; |