[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201111030201.27551.rjw@sisk.pl>
Date: Thu, 3 Nov 2011 02:01:27 +0100
From: "Rafael J. Wysocki" <rjw@...k.pl>
To: Tejun Heo <tj@...nel.org>
Cc: linux-kernel@...r.kernel.org, Oleg Nesterov <oleg@...hat.com>,
linux-pm@...r.kernel.org
Subject: Re: [PATCH pm] freezer: fix wait_event_freezable/__thaw_task races
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@...hat.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@...hat.com>
> > > Acked-by: Tejun Heo <tj@...nel.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists