From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH pm] freezer: fix wait_event_freezable/__thaw_task races
Date: Thu, 3 Nov 2011 02:01:27 +0100 [thread overview]
Message-ID: <201111030201.27551.rjw@sisk.pl> (raw)
In-Reply-To: <20111103004350.GA4417@google.com>
On Thursday, November 03, 2011, Tejun Heo wrote:
> On Thu, Nov 03, 2011 at 01:20:41AM +0100, Rafael J. Wysocki wrote:
> > On Tuesday, November 01, 2011, Tejun Heo wrote:
> > > From: Oleg Nesterov <oleg@redhat.com>
> > >
> > > wait_event_freezable() and friends stop the waiting if try_to_freeze()
> > > fails. This is not right, we can race with __thaw_task() and in this
> > > case
> > >
> > > - wait_event_freezable() returns the wrong ERESTARTSYS
> > >
> > > - wait_event_freezable_timeout() can return the positive
> > > value while condition == F
> > >
> > > Change the code to always check __retval/condition before return.
> > >
> > > Note: with or without this patch the timeout logic looks strange,
> > > probably we should recalc timeout if try_to_freeze() returns T.
> > >
> > > tj: Updated to apply to wait_event_freezekillable() too.
> > >
> > > Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> > > Acked-by: Tejun Heo <tj@kernel.org>
> >
> > Applied to linux-pm/linux-next.
>
> Just in case, this patch isn't correct with preceding patches (the
> freezer update patchset), so should only be applied after them.
OK, so I guess I should drop it from my linux-next branch?
Rafael
next prev parent reply other threads:[~2011-11-03 0:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-01 2:15 Tejun Heo
2011-11-03 0:20 ` Rafael J. Wysocki
2011-11-03 0:43 ` Tejun Heo
2011-11-03 1:01 ` Rafael J. Wysocki [this message]
2011-11-03 6:38 ` Tejun Heo
2011-11-03 10:43 ` Rafael J. Wysocki
2011-11-03 15:07 ` Tejun Heo
2011-11-03 22:12 ` Rafael J. Wysocki
2011-11-03 22:16 ` Tejun Heo
2011-11-03 22:22 ` 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=201111030201.27551.rjw@sisk.pl \
--to=rjw@sisk.pl \
--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
all inboxes | Powered by JetHome®