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)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 28 Feb 2016 00:23:16 +0000 (19:23 -0500)
commitd4565649b6d6923369112758212b851adc407f0c
treefc877b8805e9393c4288bdf396cf223de2b144ad
parentc80567c82ae4814a41287618e315a60ecf513be6
namei: ->d_inode of a pinned dentry is stable only for positives

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>
fs/namei.c