[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110513084611.GB6500@htj.dyndns.org>
Date: Fri, 13 May 2011 10:46:11 +0200
From: Tejun Heo <tj@...nel.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: jan.kratochvil@...hat.com, vda.linux@...glemail.com,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, indan@....nu
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
--
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