lkml.org 
[lkml]   [2011]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] freezer: fix wait_event_freezable/__thaw_task races
Hello,

On 09/11, Tejun Heo wrote:
>
> On Thu, Sep 08, 2011 at 07:59:26PM +0200, Oleg Nesterov wrote:
>
> > > Yeap, with freezable_with_signal gone, this looks correct & simpler to
> > > me
> >
> > I don't really understand this... set_freezable_with_signal() has a
> > lot of problems, yes... But even if it wasn't removed this fix makes
> > sense anyway, afaics.
> >
> > If freezable_with_signal caller does wait_event_freezable_timeout(),
> > __retval becomes -ERESTARTSYS after freeze_task(). The next iteration
> > will return 0 with the KERN_ERR message from schedule_timeout().
>
> Hmmm... but with the change, if a kthread gets TIF_SIGPENDING from
> freezer and then thawed, it would not enter try_to_freeze() and thus
> won't clear TIF_SIGPENDING.

Ah yes, you are right, thanks. But once again, please note that in this
case wait_event_freezable_timeout() is broken anyway.

> > > but it would be nice if you can sprinkle some documentation while
> > > at it. :)
> >
> > But they already have the comment ;) What can I add?
>
> Proper /** - */ comment w/ return value documentation? :P

I already noticed a long ago you like the comments too much ;)

OK, will do.

Oleg.



\
 
 \ /
  Last update: 2011-09-11 20:35    [W:0.208 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site