Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=433ecb4ab312f873870b67ee374502e84f6dcf92 Commit: 433ecb4ab312f873870b67ee374502e84f6dcf92 Parent: e87be1143472d841c1907e6e7ae4862a30e3595c Author: Oleg Nesterov <[EMAIL PROTECTED]> AuthorDate: Sun May 6 14:50:40 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Mon May 7 12:12:58 2007 -0700
fix refrigerator() vs thaw_process() race refrigerator() can miss a wakeup, "wait event" loop needs a proper memory ordering. Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]> Acked-by: "Rafael J. Wysocki" <[EMAIL PROTECTED]> Cc: Pavel Machek <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- kernel/power/process.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/power/process.c b/kernel/power/process.c index 6d566bf..0eb5c42 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c @@ -47,8 +47,10 @@ void refrigerator(void) recalc_sigpending(); /* We sent fake signal, clean it up */ spin_unlock_irq(¤t->sighand->siglock); - while (frozen(current)) { - current->state = TASK_UNINTERRUPTIBLE; + for (;;) { + set_current_state(TASK_UNINTERRUPTIBLE); + if (!frozen(current)) + break; schedule(); } pr_debug("%s left refrigerator\n", current->comm); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html