Not sure this todo-like comment is really needed, but perhaps it can simplify the review. I mean it can help to avoid "this is racy" complaints.
Also, kill return after WARN_ON(). It doesn't hurt, but it looks as if we have to return or something bad will happen. --- kernel/ptrace.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- PU/kernel/ptrace.c~92_NOTIFY_STOP_COMMENTS 2009-10-15 20:09:10.000000000 +0200 +++ PU/kernel/ptrace.c 2009-10-15 20:34:46.000000000 +0200 @@ -913,9 +913,14 @@ static int ptrace_rw_siginfo(struct task static void do_ptrace_notify_stop(struct ptrace_context *context, struct task_struct *tracee) { + /* + * This can race with SIGKILL, but we borrow this race from + * the old ptrace implementation. ->exit_code is only needed + * for wait_task_stopped()->task_stopped_code(), we should + * change it to use ptrace_context. + */ tracee->exit_code = context->stop_code & PTRACE_EVENT_MASK; - if (WARN_ON(!tracee->exit_code)) - return; + WARN_ON(!tracee->exit_code); read_lock(&tasklist_lock); /*