* [patch] PF_DEAD cleanup
@ 2005-10-08 10:04 Coywolf Qi Hunt
0 siblings, 0 replies; only message in thread
From: Coywolf Qi Hunt @ 2005-10-08 10:04 UTC (permalink / raw)
To: akpm; +Cc: zwane, linux-kernel
Hello,
The PF_DEAD setting doesn't belong to exit_notify(), move it to a proper place.
Coywolf
Signed-off-by: Coywolf Qi Hunt <qiyong@fc-cn.com>
---
exit.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- 2.6.14-rc3-cy/kernel/exit.c~orig 2005-10-08 17:03:39.000000000 +0800
+++ 2.6.14-rc3-cy/kernel/exit.c 2005-10-08 17:18:03.000000000 +0800
@@ -783,10 +783,6 @@ static void exit_notify(struct task_stru
/* 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)
@@ -869,7 +865,10 @@ fastcall NORET_TYPE void do_exit(long co
tsk->mempolicy = NULL;
#endif
- BUG_ON(!(current->flags & PF_DEAD));
+ /* PF_DEAD causes final put_task_struct after we schedule. */
+ preempt_disable();
+ current->flags |= PF_DEAD;
+
schedule();
BUG();
/* Avoid "noreturn function does return". */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-10-08 10:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-08 10:04 [patch] PF_DEAD cleanup Coywolf Qi Hunt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome