]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.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)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:22:45 +0000 (10:22 +0100)
commit32b9b145fba1ef6545cd6b8c9a785103a83be0ef
tree1f4c3971f3253f252f91a31a5c9017cb9d495627
parenta14ed512530830ae844aa4446c3e132d0f6e31dd
namei: ->d_inode of a pinned dentry is stable only for positives

BugLink: http://bugs.launchpad.net/bugs/1553179
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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fs/namei.c