From: Oleg Nesterov Date: Thu, 18 Jun 2009 23:49:11 +0000 (-0700) Subject: ptrace: wait_task_zombie: do not account traced sub-threads X-Git-Tag: v2.6.31-rc1~125 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=befca96779b0259ac8fad0183e748a62935c39cb;p=pandora-kernel.git ptrace: wait_task_zombie: do not account traced sub-threads The bug is ancient. If we trace the sub-thread of our natural child and this sub-thread exits, we update parent->signal->cxxx fields. But we should not do this until the whole thread-group exits, otherwise we account this thread (and all other live threads) twice. Add the task_detached() check. No need to check thread_group_empty(), wait_consider_task()->delay_group_leader() already did this. Signed-off-by: Oleg Nesterov Cc: Peter Zijlstra Acked-by: Roland McGrath Cc: Stanislaw Gruszka Cc: Vitaly Mayatskikh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed