]> git.hungrycats.org Git - linux/commit
fix breakage caused by d_find_alias() semantics change
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 25 Apr 2018 14:28:38 +0000 (10:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 06:17:14 +0000 (08:17 +0200)
commit13b11c700cc2ee9b714c6c33579a6bdffb5ed002
treebd867cc0fbd9af06ece3a5b13ea426e4ed1487f3
parent3f4682df1217ab9583e13b21d5d5b6969479df63
fix breakage caused by d_find_alias() semantics change

commit b127125d9db23e4856156a7c909a3c8e18b69f99 upstream.

"VFS: don't keep disconnected dentries on d_anon" had a non-trivial
side-effect - d_unhashed() now returns true for those dentries,
making d_find_alias() skip them altogether.  For most of its callers
that's fine - we really want a connected alias there.  However,
there is a codepath where we relied upon picking such aliases
if nothing else could be found - selinux delayed initialization
of contexts for inodes on already mounted filesystems used to
rely upon that.

Cc: stable@kernel.org # f1ee616214cb "VFS: don't keep disconnected dentries on d_anon"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/selinux/hooks.c