]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
ptrace: simplify ptrace_stop()->sigkill_pending() path
authorOleg Nesterov <oleg@tv-sign.ru>
Fri, 25 Jul 2008 08:47:37 +0000 (01:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Jul 2008 17:53:39 +0000 (10:53 -0700)
commit3d749b9e676b26584a47e75c235aa6f69d0697ae
tree2db2dab84cde07c4872ac5e8d4078f2a3fc4271d
parent364d3c13c17f45da6d638011078d4c4d3070d719
ptrace: simplify ptrace_stop()->sigkill_pending() path

1. SIGKILL can't be blocked, remove this check from sigkill_pending().

2. When ptrace_stop() sees sigkill_pending() == T, it can just return.
   Kill "int killed" and simplify the code. This also is more correct,
   the tracer shouldn't see us in TASK_TRACED if we are not going to
   stop.

I strongly believe this code needs further changes.  We should do the "was
this task killed" check unconditionally, currently it depends on
arch_ptrace_stop_needed().  On the other hand, sigkill_pending() isn't
very clever.  If the task was killed tkill(SIGKILL), the signal can be
already dequeued if the caller is do_exit().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/signal.c