]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
namei: ->d_inode of a pinned dentry is stable only for positives
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 28 Feb 2016 00:23:16 +0000 (19:23 -0500)
committerSasha Levin <sasha.levin@oracle.com>
Wed, 9 Mar 2016 18:15:13 +0000 (13:15 -0500)
commit9b77cd137fd841d7a14e1c9428cfc49f4df0306e
tree571c08f94d18e00ddb986a07149a7b97f8bb258f
parent3960cde3e356057bd60adce1b625a7d178b9581c
namei: ->d_inode of a pinned dentry is stable only for positives

[ Upstream commit d4565649b6d6923369112758212b851adc407f0c ]

both do_last() and walk_component() risk picking a NULL inode out
of dentry about to become positive, *then* checking its flags and
seeing that it's not negative anymore and using (already stale by
then) value they'd fetched earlier.  Usually ends up oopsing soon
after that...

Cc: stable@vger.kernel.org # v3.13+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
fs/namei.c