aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2021-11-22 09:51:03 -0600
committerEric W. Biederman <ebiederm@xmission.com>2021-12-13 12:04:45 -0600
commit7f80a2fd7db9a55894fd841915236aca611291b5 (patch)
tree8fd67c59d10bc2e69fb34ce9d36ba91e715e9e57 /kernel/exit.c
parent05ea0424f0e21c0ef9b47c89826e7c22ae137975 (diff)
downloadlinux-7f80a2fd7db9a55894fd841915236aca611291b5.tar.gz
exit: Stop poorly open coding do_task_dead in make_task_dead
When the kernel detects it is oops or otherwise force killing a task while it exits the code poorly attempts to permanently stop the task from scheduling. I say poorly because it is possible for a task in TASK_UINTERRUPTIBLE to be woken up. As it makes no sense for the task to continue call do_task_dead instead which actually does the work and permanently removes the task from the scheduler. Guaranteeing the task will never be woken up again. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index d0ec6f6b41cb4..f975cd8a2ed82 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -886,8 +886,7 @@ void __noreturn make_task_dead(int signr)
if (unlikely(tsk->flags & PF_EXITING)) {
pr_alert("Fixing recursive fault but reboot is needed!\n");
futex_exit_recursive(tsk);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule();
+ do_task_dead();
}
do_exit(signr);