lkml.org 
[lkml]   [2011]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] ptrace: do_wait(traced_leader_killed_by_mt_exec) can block forever
Hello,

On Thu, Jul 21, 2011 at 08:00:43PM +0200, Oleg Nesterov wrote:
> It is racy, exit_notify() does __wake_up_parent() too. But in the
> likely case it triggers the problem: de_thread() does release_task()
> and the old leader goes away without the notification, the tracer
> sleeps in do_wait() without children/tracees.
>
> Change de_thread() to do __wake_up_parent(traced_leader->parent).
> Since it is already EXIT_DEAD we can do this without ptrace_unlink(),
> EXIT_DEAD threads do not exist from do_wait's pov.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>

Nice catch as always. :)

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

--
tejun


\
 
 \ /
  Last update: 2011-07-22 10:47    [W:0.076 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site