summaryrefslogtreecommitdiff
path: root/kernel/power/process.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2004-10-18 09:12:06 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-18 09:12:06 -0700
commitd3069b4dd0767b4e24debdb21b632b2f8dd72474 (patch)
tree069671a054a203777b91dfe00e68392e4d774496 /kernel/power/process.c
parent7a9a3e863d834b3c9abf46b7921654f16343b5bc (diff)
[PATCH] fix & clean up zombie/dead task handling & preemption
This patch fixes all the preempt-after-task->state-is-TASK_DEAD problems we had. Right now, the moment procfs does a down() that sleeps in proc_pid_flush() [it could] our TASK_DEAD state is zapped and we might be back to TASK_RUNNING to and we trigger this assert: schedule(); BUG(); /* Avoid "noreturn function does return". */ for (;;) ; I have split out TASK_ZOMBIE and TASK_DEAD into a separate p->exit_state field, to allow the detaching of exit-signal/parent/wait-handling from descheduling a dead task. Dead-task freeing is done via PF_DEAD. Tested the patch on x86 SMP and UP, but all architectures should work fine. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power/process.c')
-rw-r--r--kernel/power/process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c
index bda013de59a5..78d92dc6a1ed 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -23,8 +23,8 @@ static inline int freezeable(struct task_struct * p)
{
if ((p == current) ||
(p->flags & PF_NOFREEZE) ||
- (p->state == TASK_ZOMBIE) ||
- (p->state == TASK_DEAD) ||
+ (p->exit_state == EXIT_ZOMBIE) ||
+ (p->exit_state == EXIT_DEAD) ||
(p->state == TASK_STOPPED) ||
(p->state == TASK_TRACED))
return 0;