]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite7c353b06d49a64e01150a8fed0726eece49ffe5
tree1b8e6d6d6fb425783d1eea0d0f37a1bcedbbbacb
parent77bab2c7b583d3cc0d7df5c1d2e84f0b5eef14e9
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