diff options
author | Tejun Heo <tj@kernel.org> | 2011-11-21 12:32:25 -0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-11-21 12:32:25 -0800 |
commit | 96ee6d8539c9fc6742908d85eb9723abb5c91854 (patch) | |
tree | 0c042d74508c777c33744e5a917ac16e057f073b /lib/flex_array.c | |
parent | 948246f70a811c872b9d93bb4a8ab5823c4c79e0 (diff) |
freezer: fix set_freezable[_with_signal]() race
A kthread doing set_freezable*() may race with on-going PM freeze and
the freezer might think all tasks are frozen while the new freezable
kthread is merrily proceeding to execute code paths which aren't
supposed to be executing during PM freeze.
Reimplement set_freezable[_with_signal]() using __set_freezable() such
that freezable PF flags are modified under freezer_lock and
try_to_freeze() is called afterwards. This eliminates race condition
against freezing.
Note: Separated out from larger patch to resolve fix order dependency
Oleg pointed out.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'lib/flex_array.c')
0 files changed, 0 insertions, 0 deletions