[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20080610165052.GA6029@tv-sign.ru>
Date: Tue, 10 Jun 2008 20:50:52 +0400
From: Oleg Nesterov <oleg@...sign.ru>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Dmitry Adamushko <dmitry.adamushko@...il.com>,
Ingo Molnar <mingo@...e.hu>, Matthew Wilcox <matthew@....cx>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Roland McGrath <roland@...hat.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] 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() should respect 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@...sign.ru>
--- 26-rc2/include/linux/sched.h~1_KILL_TRACED_CHECK 2008-06-01 16:44:39.000000000 +0400
+++ 26-rc2/include/linux/sched.h 2008-06-01 16:44:39.000000000 +0400
@@ -2034,9 +2034,6 @@ static inline int signal_pending_state(l
if (!signal_pending(p))
return 0;
- if (state & (__TASK_STOPPED | __TASK_TRACED))
- return 0;
-
return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists