Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3ca013d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents f7644cbf aa65fa35
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;