diff options
author | Tejun Heo <tj@kernel.org> | 2011-11-21 15:32:23 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-11-21 15:32:23 -0500 |
commit | a585042f7b933539a0b6bc63650c2d49ffb2e55d (patch) | |
tree | bb93d05050e04c4bcd53fdf535239e6312fb62e2 /kernel/power/process.c | |
parent | a5be2d0d1a8746e7be5210e3d6b904455000443c (diff) |
freezer: remove racy clear_freeze_flag() and set PF_NOFREEZE on dead tasks
clear_freeze_flag() in exit_mm() is racy. Freezing can start
afterwards. Remove it. Skipping freezer for exiting task will be
properly implemented later.
Also, freezable() was testing exit_state directly to make system
freezer ignore dead tasks. Let the exiting task set PF_NOFREEZE after
entering TASK_DEAD instead.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'kernel/power/process.c')
-rw-r--r-- | kernel/power/process.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c index fe2787207f00..23822dc14b6c 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c | |||
@@ -25,8 +25,7 @@ | |||
25 | static inline int freezable(struct task_struct * p) | 25 | static inline int freezable(struct task_struct * p) |
26 | { | 26 | { |
27 | if ((p == current) || | 27 | if ((p == current) || |
28 | (p->flags & PF_NOFREEZE) || | 28 | (p->flags & PF_NOFREEZE)) |
29 | (p->exit_state != 0)) | ||
30 | return 0; | 29 | return 0; |
31 | return 1; | 30 | return 1; |
32 | } | 31 | } |