follow_dotdot{,_rcu}(): lift LOOKUP_BENEATH checks out of loop
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 26 Feb 2020 16:59:02 +0000 (11:59 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 14 Mar 2020 01:09:13 +0000 (21:09 -0400)
commitc9a0f75d81e3ffccb885f0069d45e065acc0349a
tree1b8e6d6d6fb425783d1eea0d0f37a1bcedbbbacb
parentabc2c632e0cec6f76883d008c298e31cb3e2d242
follow_dotdot{,_rcu}(): lift LOOKUP_BENEATH checks out of loop

Behaviour change: LOOKUP_BENEATH lookup of .. in absolute root
yields an error even if it's not the process' root.  That's
possible only if you'd managed to escape chroot jail by way of
procfs symlinks, but IMO the resulting behaviour is not worse -
more consistent and easier to describe:
".." in root is "stay where you are", uness LOOKUP_BENEATH
has been given, in which case it's "fail with EXDEV".

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c