diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2008-07-25 04:47:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-25 13:53:39 -0400 |
commit | 364d3c13c17f45da6d638011078d4c4d3070d719 (patch) | |
tree | 2e6215dd458010cd92786ac7d67053c5d5171c74 /include | |
parent | f22ab814a24e654b1de24db0c5f8b57b5ab2026a (diff) |
ptrace: give more respect to SIGKILL
ptrace_stop() has some complicated checks to prevent the scheduling in the
TASK_TRACED state with the pending SIGKILL, but these checks are racy, and
they depend on arch_ptrace_stop_needed().
This patch assumes that the traced task should die asap if it was killed by
SIGKILL, in that case schedule()->signal_pending_state() has no reason to
ignore the TASK_WAKEKILL part of TASK_TRACED, and we can kill this nasty
special case.
Note: do_exit()->ptrace_notify() is special, the killed task can already
dequeue SIGKILL at this point. Another indication that fatal_signal_pending()
is not exactly right.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6aca4a16e377..79e749dbf81e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2054,9 +2054,6 @@ static inline int signal_pending_state(long state, struct task_struct *p) | |||
2054 | if (!signal_pending(p)) | 2054 | if (!signal_pending(p)) |
2055 | return 0; | 2055 | return 0; |
2056 | 2056 | ||
2057 | if (state & (__TASK_STOPPED | __TASK_TRACED)) | ||
2058 | return 0; | ||
2059 | |||
2060 | return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); | 2057 | return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); |
2061 | } | 2058 | } |
2062 | 2059 | ||