Aleksa Sarai fd59f1e5f2 namei: only return -ECHILD from follow_dotdot_rcu()
commit 2b98149c2377bff12be5dd3ce02ae0506e2dd613 upstream.

It's over-zealous to return hard errors under RCU-walk here, given that
a REF-walk will be triggered for all other cases handling ".." under
RCU.

The original purpose of this check was to ensure that if a rename occurs
such that a directory is moved outside of the bind-mount which the
resolution started in, it would be detected and blocked to avoid being
able to mess with paths outside of the bind-mount. However, triggering a
new REF-walk is just as effective a solution.

Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Fixes: 397d425dc26d ("vfs: Test for and handle paths that are unreachable from their mnt_root")
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-11 07:51:14 +01:00
..
2017-12-20 10:04:56 +01:00
2019-08-06 18:28:27 +02:00
2019-12-21 10:34:44 +01:00
2019-12-21 10:34:49 +01:00
2017-11-30 08:37:20 +00:00
2019-03-23 08:44:21 +01:00
2020-02-28 15:38:54 +01:00
2018-12-21 14:09:50 +01:00
2015-11-10 12:07:22 -08:00
2015-11-16 23:54:45 -08:00
2015-11-16 23:54:45 -08:00
2017-06-14 13:16:24 +02:00
2018-02-16 20:09:43 +01:00
2017-06-14 13:16:24 +02:00
2018-09-09 20:04:36 +02:00