Re: [PATCH 09/11] job control: reorganize wait_task_stopped()

From: Tejun Heo
Date: Wed May 11 2011 - 15:29:14 EST


Hello,

On Wed, May 11, 2011 at 05:48:54PM +0200, Oleg Nesterov wrote:
> > It seems that WNOHANG wait correctness has never been guaranteed and
> > everybody has been happy with it for very long time.
>
> Yes, the window is tiny. May be it was never noticed or never
> reported because this is hard to diagnose/reproduced.

Yeah, most likely.

> > As such,
> > although this reorganization improves the situation a bit, I don't
> > consider this to be a bug fix.
>
> But it is?
>
> Can't we push this patch ahead of these changes? I can merge it into
> ptrace branch.

It doesn't really fix the problem tho. The whole thing is full of
holes and I think it would be better to just declare "WNOHANG might
fail even when it's not supposed to, retry later" than making the
locking heavier there, which could easily be much more relevant
regression. Of course, if we can fix it without adding extra locking
or too much complexity, it would be nice.

Anyways, yeah, sure. I'll resend it as a separate patch.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/