From c9dfe0dbfc3df30efce629910c0388cedd66b37b Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Wed, 13 Dec 2006 00:34:28 -0800 Subject: [PATCH] --- yaml --- r: 44461 b: refs/heads/master c: 3df494a32b936aef76d893f5065f962ebd9b9437 h: refs/heads/master i: 44459: 9c24400b155d29b5800e72deb5f769514a3b4e12 v: v3 --- [refs] | 2 +- trunk/kernel/power/process.c | 12 ++++++------ trunk/kernel/signal.c | 4 +++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 06ce0b749bf0..34b765ff7dfc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6a2d7a955d8de6cb19ed9cd194b3c83008a22c32 +refs/heads/master: 3df494a32b936aef76d893f5065f962ebd9b9437 diff --git a/trunk/kernel/power/process.c b/trunk/kernel/power/process.c index 99eeb119b06d..b9a32860bef3 100644 --- a/trunk/kernel/power/process.c +++ b/trunk/kernel/power/process.c @@ -28,8 +28,7 @@ static inline int freezeable(struct task_struct * p) if ((p == current) || (p->flags & PF_NOFREEZE) || (p->exit_state == EXIT_ZOMBIE) || - (p->exit_state == EXIT_DEAD) || - (p->state == TASK_STOPPED)) + (p->exit_state == EXIT_DEAD)) return 0; return 1; } @@ -61,9 +60,12 @@ static inline void freeze_process(struct task_struct *p) unsigned long flags; if (!freezing(p)) { + if (p->state == TASK_STOPPED) + force_sig_specific(SIGSTOP, p); + freeze(p); spin_lock_irqsave(&p->sighand->siglock, flags); - signal_wake_up(p, 0); + signal_wake_up(p, p->state == TASK_STOPPED); spin_unlock_irqrestore(&p->sighand->siglock, flags); } } @@ -103,9 +105,7 @@ static unsigned int try_to_freeze_tasks(int freeze_user_space) if (frozen(p)) continue; - if (p->state == TASK_TRACED && - (frozen(p->parent) || - p->parent->state == TASK_STOPPED)) { + if (p->state == TASK_TRACED && frozen(p->parent)) { cancel_freezing(p); continue; } diff --git a/trunk/kernel/signal.c b/trunk/kernel/signal.c index 1921ffdc5e77..5630255d2e2a 100644 --- a/trunk/kernel/signal.c +++ b/trunk/kernel/signal.c @@ -1705,7 +1705,9 @@ finish_stop(int stop_count) read_unlock(&tasklist_lock); } - schedule(); + do { + schedule(); + } while (try_to_freeze()); /* * Now we don't run again until continued. */