From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Pavel Machek <pavel@ucw.cz>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix refrigerator() vs thaw_process() race
Date: Mon, 19 Feb 2007 00:28:03 +0100 [thread overview]
Message-ID: <200702190028.03619.rjw@sisk.pl> (raw)
In-Reply-To: <20070218221737.GA4880@tv-sign.ru>
On Sunday, 18 February 2007 23:17, Oleg Nesterov wrote:
> refrigerator() can miss a wakeup, "wait event" loop needs a proper memory
> ordering.
>
> Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
ACK
> --- WQ/kernel/power/process.c~WAKE 2007-02-18 22:56:49.000000000 +0300
> +++ WQ/kernel/power/process.c 2007-02-19 01:04:26.000000000 +0300
> @@ -46,8 +46,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);
>
>
>
--
If you don't have the time to read,
you don't have the time or the tools to write.
- Stephen King
next prev parent reply other threads:[~2007-02-18 23:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-18 22:17 [PATCH] fix refrigerator() vs thaw_process() race Oleg Nesterov
2007-02-18 23:28 ` Rafael J. Wysocki [this message]
2007-02-19 10:50 ` Pavel Machek
2007-02-19 12:12 ` Oleg Nesterov
2007-02-19 22:47 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200702190028.03619.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox