aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/process.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c
index b9a32860bef3..6d566bf7085c 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -60,13 +60,16 @@ static inline void freeze_process(struct task_struct *p)
60 unsigned long flags; 60 unsigned long flags;
61 61
62 if (!freezing(p)) { 62 if (!freezing(p)) {
63 if (p->state == TASK_STOPPED) 63 rmb();
64 force_sig_specific(SIGSTOP, p); 64 if (!frozen(p)) {
65 65 if (p->state == TASK_STOPPED)
66 freeze(p); 66 force_sig_specific(SIGSTOP, p);
67 spin_lock_irqsave(&p->sighand->siglock, flags); 67
68 signal_wake_up(p, p->state == TASK_STOPPED); 68 freeze(p);
69 spin_unlock_irqrestore(&p->sighand->siglock, flags); 69 spin_lock_irqsave(&p->sighand->siglock, flags);
70 signal_wake_up(p, p->state == TASK_STOPPED);
71 spin_unlock_irqrestore(&p->sighand->siglock, flags);
72 }
70 } 73 }
71} 74}
72 75