]> git.kernelconcepts.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:07:13 +0000 (15:07 -0800)
commitaaf1569ce4575ed163839002f27da2cde4d10a77
tree0a08aa47fdd875d8dc66c8a31f00495728096219
parenta007fc3d6569b620ec5bca1b4636d952ebdd2627
namei: ->d_inode of a pinned dentry is stable only for positives

commit d4565649b6d6923369112758212b851adc407f0c upstream.

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...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/namei.c