lkml.org 
[lkml]   [2011]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/11] job control: reorganize wait_task_stopped()
Hello,

On Thu, May 12, 2011 at 08:33:26PM +0200, Oleg Nesterov wrote:
> Damn, you are right, I think.

Yay, for once!

> At first glance, do_wait() does
>
> wait_task_stopped();
> wait_task_continued();
>
> and the state can be changed CONTINIUED -> STOPPED in between, right?
> Or something else?

Yeah and exit transitions too. There simply is no synchronization
there. We can probably solve it without acquiring siglock by adding
"clear this before making state transitions" flag followed by a mb()
and then making children clear it before transitions. Then, we can
retry WNOHANG wait if the flag is cleared after checking.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2011-05-13 10:49    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site