Messages in this thread | | | Date | Fri, 13 May 2011 10:46:11 +0200 | From | Tejun Heo <> | Subject | Re: [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
| |