From: Oleg Nesterov Date: Wed, 30 Apr 2008 07:53:14 +0000 (-0700) Subject: ptrace: ptrace_attach: use send_sig_info() instead force_sig_specific() X-Git-Tag: v2.6.26-rc1~262 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33e9fc7d01269737cd5a3b6de1db9d0e796ab708;p=linux-2.6 ptrace: ptrace_attach: use send_sig_info() instead force_sig_specific() Nobody can block/ignore SIGSTOP, no need to use force_sig_specific() in ptrace_attach. Use the "regular" send_sig_info(). With this patch stracing of /sbin/init doesn't clear its SIGNAL_UNKILLABLE, but not that this makes ptracing of init safe. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/ptrace.c b/kernel/ptrace.c index ce66d66881..5f8d452e81 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -208,8 +208,7 @@ repeat: __ptrace_link(task, current); - force_sig_specific(SIGSTOP, task); - + send_sig_info(SIGSTOP, SEND_SIG_FORCED, task); bad: write_unlock_irqrestore(&tasklist_lock, flags); task_unlock(task);