From d91868c336736c967483a92906f0773ca485fea8 Mon Sep 17 00:00:00 2001 From: Coywolf Qi Hunt Date: Sun, 30 Oct 2005 15:02:47 -0800 Subject: [PATCH] --- yaml --- r: 11853 b: refs/heads/master c: 7407251a0e2ed099e4b12b742b635503e981507c h: refs/heads/master i: 11851: 83ee2501d9852112b0c0525af13b635a3648c0c7 v: v3 --- [refs] | 2 +- trunk/kernel/exit.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index abaab7b76845..a2bc351e6c73 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 40dc565122ed1e180a0637f88cdfca734d33db78 +refs/heads/master: 7407251a0e2ed099e4b12b742b635503e981507c diff --git a/trunk/kernel/exit.c b/trunk/kernel/exit.c index 79f52b85d6ed..6ef8f7356a74 100644 --- a/trunk/kernel/exit.c +++ b/trunk/kernel/exit.c @@ -783,10 +783,6 @@ static void exit_notify(struct task_struct *tsk) /* If the process is dead, release it - nobody will wait for it */ if (state == EXIT_DEAD) release_task(tsk); - - /* PF_DEAD causes final put_task_struct after we schedule. */ - preempt_disable(); - tsk->flags |= PF_DEAD; } fastcall NORET_TYPE void do_exit(long code) @@ -873,7 +869,11 @@ fastcall NORET_TYPE void do_exit(long code) tsk->mempolicy = NULL; #endif - BUG_ON(!(current->flags & PF_DEAD)); + /* PF_DEAD causes final put_task_struct after we schedule. */ + preempt_disable(); + BUG_ON(tsk->flags & PF_DEAD); + tsk->flags |= PF_DEAD; + schedule(); BUG(); /* Avoid "noreturn function does return". */