From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Tejun Heo <tj@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Oleg Nesterov <oleg@redhat.com>, Jeff Layton <jlayton@redhat.com>
Subject: Re: [PATCH pm-for-3.2 2/2] freezer: revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too"
Date: Fri, 4 Nov 2011 01:13:21 +0100 [thread overview]
Message-ID: <201111040113.21514.rjw@sisk.pl> (raw)
In-Reply-To: <20111103230910.GT4417@google.com>
On Friday, November 04, 2011, Tejun Heo wrote:
> Commit 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake
> TASK_KILLABLE tasks too" updated fake_signal_wake_up() used by freezer
> to wake up KILLABLE tasks. Sending unsolicited wakeups to tasks in
> killable sleep is dangerous as there are code paths which depend on
> tasks not waking up spuriously from KILLABLE sleep.
>
> For example. sys_read() or page can sleep in TASK_KILLABLE assuming
> that wait/down/whatever _killable can only fail if we can not return
> to the usermode. TASK_TRACED is another obvious example.
>
> The previous patch updated wait_event_freezekillable() such that it
> doesn't depend on the spurious wakeup. This patch reverts the
> offending commit.
>
> Note that the spurious KILLABLE wakeup had other implicit effects in
> KILLABLE sleeps in nfs and cifs and those will need further updates to
> regain freezekillable behavior.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Jeff Layton <jlayton@redhat.com>
> LKML-Reference: <20111031221743.GA18855@google.com>
Applied to linux-pm/linux-next.
Thanks,
Rafael
> ---
> This will cause conflict with the pending linux-next patches but the
> resolution should be trivial. Simply changing @resume from 0 to 1 is
> enough.
>
> Thanks.
>
> kernel/freezer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: work/kernel/freezer.c
> ===================================================================
> --- work.orig/kernel/freezer.c
> +++ work/kernel/freezer.c
> @@ -67,7 +67,7 @@ static void fake_signal_wake_up(struct t
> unsigned long flags;
>
> spin_lock_irqsave(&p->sighand->siglock, flags);
> - signal_wake_up(p, 1);
> + signal_wake_up(p, 0);
> spin_unlock_irqrestore(&p->sighand->siglock, flags);
> }
>
>
>
next prev parent reply other threads:[~2011-11-04 0:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-03 23:07 [PATCH pm-for-3.2 1/2] freezer: reimplement wait_event_freezekillable using freezer_do_not_count/freezer_count() Tejun Heo
2011-11-03 23:09 ` [PATCH pm-for-3.2 2/2] freezer: revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too" Tejun Heo
2011-11-04 0:13 ` Rafael J. Wysocki [this message]
2011-11-04 0:17 ` Tejun Heo
2011-11-04 0:24 ` Rafael J. Wysocki
2011-11-04 0:27 ` Tejun Heo
2011-11-04 0:42 ` Rafael J. Wysocki
2011-11-04 0:13 ` [PATCH pm-for-3.2 1/2] freezer: reimplement wait_event_freezekillable using freezer_do_not_count/freezer_count() Rafael J. Wysocki
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=201111040113.21514.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=jlayton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=tj@kernel.org \
/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