From: Pavel Machek <pavel@ucw.cz>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
"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 11:50:08 +0100 [thread overview]
Message-ID: <20070219105008.GA19184@elf.ucw.cz> (raw)
In-Reply-To: <20070218221737.GA4880@tv-sign.ru>
Hi!
> refrigerator() can miss a wakeup, "wait event" loop needs a proper memory
> ordering.
>
> Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
>
> --- 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);
>
> - current->state = TASK_UNINTERRUPTIBLE;
> + set_current_state(TASK_UNINTERRUPTIBLE);
Looks okay to me... but this one liner would be exactly as effective,
right?
Pavel
> schedule();
> }
> pr_debug("%s left refrigerator\n", current->comm);
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2007-02-19 10:50 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
2007-02-19 10:50 ` Pavel Machek [this message]
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=20070219105008.GA19184@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rjw@sisk.pl \
/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