ptrace: kill __ptrace_detach(), fix ->exit_state check
commit887832b0dc724dec5d0fe7a0e58e035294ce1008
authorOleg Nesterov <oleg@redhat.com>
Thu, 2 Apr 2009 23:58:11 +0000 (2 16:58 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Jun 2009 16:40:18 +0000 (15 09:40 -0700)
tree2640378adbdd8f1ad3829c6ab64db3701cd8a6fa
parentd1e765382f287bd9707b95600b6424eea2c4326b
ptrace: kill __ptrace_detach(), fix ->exit_state check

commit 95c3eb76dc07fd81289888ffc42948196b34b444 upstream.

Move the code from __ptrace_detach() to its single caller and kill this
helper.

Also, fix the ->exit_state check, we shouldn't wake up EXIT_DEAD tasks.
Actually, I think task_is_stopped_or_traced() makes more sense, but this
needs another patch.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/ptrace.c