]> git.baikalelectronics.ru Git - kernel.git/commit
root dentries need RCU-delayed freeing
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 6 Aug 2018 13:03:58 +0000 (09:03 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 6 Aug 2018 13:13:32 +0000 (09:13 -0400)
commit61835ff3a93d31cbccdb97245346df4ebbec9819
tree4c7687f8ce7a84e659596b6dfaeee36e8d53ef7f
parenta76cf1f4a96ac0983b3b42bf6d29e0134a4b8626
root dentries need RCU-delayed freeing

Since mountpoint crossing can happen without leaving lazy mode,
root dentries do need the same protection against having their
memory freed without RCU delay as everything else in the tree.

It's partially hidden by RCU delay between detaching from the
mount tree and dropping the vfsmount reference, but the starting
point of pathwalk can be on an already detached mount, in which
case umount-caused RCU delay has already passed by the time the
lazy pathwalk grabs rcu_read_lock().  If the starting point
happens to be at the root of that vfsmount *and* that vfsmount
covers the entire filesystem, we get trouble.

Fixes: 39108bd316f8 ("RCU'd vsfmounts")
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c