diff options
-rw-r--r-- | kernel/power/process.c | 12 | ||||
-rw-r--r-- | kernel/signal.c | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c index 99eeb119b06d..b9a32860bef3 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c | |||
@@ -28,8 +28,7 @@ static inline int freezeable(struct task_struct * p) | |||
28 | if ((p == current) || | 28 | if ((p == current) || |
29 | (p->flags & PF_NOFREEZE) || | 29 | (p->flags & PF_NOFREEZE) || |
30 | (p->exit_state == EXIT_ZOMBIE) || | 30 | (p->exit_state == EXIT_ZOMBIE) || |
31 | (p->exit_state == EXIT_DEAD) || | 31 | (p->exit_state == EXIT_DEAD)) |
32 | (p->state == TASK_STOPPED)) | ||
33 | return 0; | 32 | return 0; |
34 | return 1; | 33 | return 1; |
35 | } | 34 | } |
@@ -61,9 +60,12 @@ static inline void freeze_process(struct task_struct *p) | |||
61 | unsigned long flags; | 60 | unsigned long flags; |
62 | 61 | ||
63 | if (!freezing(p)) { | 62 | if (!freezing(p)) { |
63 | if (p->state == TASK_STOPPED) | ||
64 | force_sig_specific(SIGSTOP, p); | ||
65 | |||
64 | freeze(p); | 66 | freeze(p); |
65 | spin_lock_irqsave(&p->sighand->siglock, flags); | 67 | spin_lock_irqsave(&p->sighand->siglock, flags); |
66 | signal_wake_up(p, 0); | 68 | signal_wake_up(p, p->state == TASK_STOPPED); |
67 | spin_unlock_irqrestore(&p->sighand->siglock, flags); | 69 | spin_unlock_irqrestore(&p->sighand->siglock, flags); |
68 | } | 70 | } |
69 | } | 71 | } |
@@ -103,9 +105,7 @@ static unsigned int try_to_freeze_tasks(int freeze_user_space) | |||
103 | if (frozen(p)) | 105 | if (frozen(p)) |
104 | continue; | 106 | continue; |
105 | 107 | ||
106 | if (p->state == TASK_TRACED && | 108 | if (p->state == TASK_TRACED && frozen(p->parent)) { |
107 | (frozen(p->parent) || | ||
108 | p->parent->state == TASK_STOPPED)) { | ||
109 | cancel_freezing(p); | 109 | cancel_freezing(p); |
110 | continue; | 110 | continue; |
111 | } | 111 | } |
diff --git a/kernel/signal.c b/kernel/signal.c index 1921ffdc5e77..5630255d2e2a 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1705,7 +1705,9 @@ finish_stop(int stop_count) | |||
1705 | read_unlock(&tasklist_lock); | 1705 | read_unlock(&tasklist_lock); |
1706 | } | 1706 | } |
1707 | 1707 | ||
1708 | schedule(); | 1708 | do { |
1709 | schedule(); | ||
1710 | } while (try_to_freeze()); | ||
1709 | /* | 1711 | /* |
1710 | * Now we don't run again until continued. | 1712 | * Now we don't run again until continued. |
1711 | */ | 1713 | */ |