From: Oleg Nesterov Date: Thu, 2 Apr 2009 23:58:14 +0000 (-0700) Subject: ptrace: fix possible zombie leak on PTRACE_DETACH X-Git-Tag: v2.6.30-rc1~330 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4576145c1ecdaaea9ef8976a48335206aa1ebf91;p=pandora-kernel.git ptrace: fix possible zombie leak on PTRACE_DETACH When ptrace_detach() takes tasklist, the tracee can be SIGKILL'ed. If it has already passed exit_notify() we can leak a zombie, because a) ptracing disables the auto-reaping logic, and b) ->real_parent was not notified about the child's death. ptrace_detach() should follow the ptrace_exit's logic, change the code accordingly. Signed-off-by: Oleg Nesterov Cc: Jerome Marchand Cc: Roland McGrath Tested-by: Denys Vlasenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed