From: Oleg Nesterov Date: Wed, 22 Jun 2011 21:08:53 +0000 (+0200) Subject: __ptrace_detach: avoid task_detached(), check do_notify_parent() X-Git-Tag: v3.1-rc1~308^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9843a1e977977986d0a4c1000f2229b032572534;p=pandora-kernel.git __ptrace_detach: avoid task_detached(), check do_notify_parent() __ptrace_detach() relies on the current obscure behaviour of do_notify_parent(tsk) which changes tsk->exit_signal if this child should be silently reaped. That is why we check task_detached(), it is true if the task is sub-thread, or it is the group_leader but its exit_signal was changed by do_notify_parent(). This is confusing, change the code to rely on !thread_group_leader() or the value returned by do_notify_parent(). Signed-off-by: Oleg Nesterov Acked-by: Tejun Heo --- Reading git-diff-tree failed