OSDN Git Service

exit: Move force_uaccess back into do_exit
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 7 Jan 2022 18:18:12 +0000 (12:18 -0600)
committerEric W. Biederman <ebiederm@xmission.com>
Sat, 8 Jan 2022 16:53:07 +0000 (10:53 -0600)
commitde77c3a5b95c95a4915142071643d94e3e1ada35
tree66cff37f1d177b6719483fff34572a66c54667a9
parent912616f142bfeb1dc41f40dbe7ce38331886a94a
exit: Move force_uaccess back into do_exit

With kernel threads on architectures that still have set_fs/get_fs
running as KERNEL_DS moving force_uaccess_begin does not appear safe.
Calling force_uaccess_begin is a noop on anything people care about.

Update the comment to explain why this code while looking like an
obvious candidate for moving to make_task_dead probably needs to
remain in do_exit until set_fs/get_fs are entirely removed from the
kernel.

Fixes: 05ea0424f0e2 ("exit: Move oops specific logic from do_exit into make_task_dead")
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Link: https://lkml.kernel.org/r/YdUxGKRcSiDy8jGg@zeniv-ca.linux.org.uk
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
kernel/exit.c