Home
last modified time | relevance | path

Searched hist:"8 cfe400ca54fd1ed96f962bea5f7e20b09b6d69f" (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/kernel/
H A Dfreezer.cdiff 8cfe400ca54fd1ed96f962bea5f7e20b09b6d69f Fri Nov 26 16:07:27 CST 2010 Tejun Heo <tj@kernel.org> Freezer: Fix a race during freezing of TASK_STOPPED tasks

After calling freeze_task(), try_to_freeze_tasks() see whether the
task is stopped or traced and if so, considers it to be frozen;
however, nothing guarantees that either the task being frozen sees
TIF_FREEZE or the freezer sees TASK_STOPPED -> TASK_RUNNING
transition. The task being frozen may wake up and not see TIF_FREEZE
while the freezer fails to notice the transition and believes the task
is still stopped.

This patch fixes the race by making freeze_task() always go through
fake_signal_wake_up() for applicable tasks. The function goes through
the target task's scheduler lock and thus guarantees that either the
target sees TIF_FREEZE or try_to_freeze_task() sees TASK_RUNNING.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
/openbmc/linux/kernel/power/
H A Dprocess.cdiff 8cfe400ca54fd1ed96f962bea5f7e20b09b6d69f Fri Nov 26 16:07:27 CST 2010 Tejun Heo <tj@kernel.org> Freezer: Fix a race during freezing of TASK_STOPPED tasks

After calling freeze_task(), try_to_freeze_tasks() see whether the
task is stopped or traced and if so, considers it to be frozen;
however, nothing guarantees that either the task being frozen sees
TIF_FREEZE or the freezer sees TASK_STOPPED -> TASK_RUNNING
transition. The task being frozen may wake up and not see TIF_FREEZE
while the freezer fails to notice the transition and believes the task
is still stopped.

This patch fixes the race by making freeze_task() always go through
fake_signal_wake_up() for applicable tasks. The function goes through
the target task's scheduler lock and thus guarantees that either the
target sees TIF_FREEZE or try_to_freeze_task() sees TASK_RUNNING.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>