]> git.baikalelectronics.ru Git - kernel.git/commit
exit: Guarantee make_task_dead leaks the tsk when calling do_task_exit
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 5 Jan 2022 22:30:21 +0000 (16:30 -0600)
committerEric W. Biederman <ebiederm@xmission.com>
Sat, 8 Jan 2022 16:51:23 +0000 (10:51 -0600)
commit611264058bc257a7934c1340f00478d13ba6c94b
treed29c454bf48689bce407da914b8d5fbe4a3ccbd4
parent45bcda94b370d462e9f921a9a28e1c053a0762f9
exit: Guarantee make_task_dead leaks the tsk when calling do_task_exit

Change the task state to EXIT_DEAD and take an extra rcu_refernce
to guarantee the task will not be reaped and that it will not be
freed.

Link: https://lkml.kernel.org/r/YdUzjrLAlRiNLQp2@zeniv-ca.linux.org.uk
Pointed-out-by: Al Viro <viro@zeniv.linux.org.uk>
Fixes: 560b31fd75ca ("exit: Stop poorly open coding do_task_dead in make_task_dead")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
kernel/exit.c