]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
commit26b45d718cc81d217a02cb2ef00df9074a723148
tree754c3ed1601c1d60cd100aeb92bbff1db7504576
parent5878ea8c01181afcf3984c0ef6518917f49f0d44
fix breakage caused by d_find_alias() semantics change

BugLink: http://bugs.launchpad.net/bugs/1786352
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
security/selinux/hooks.c