Skip to content

Commit

Permalink
ptrace: ptrace_attach: use send_sig_info() instead force_sig_specific()
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Apr 30, 2008
1 parent 68cb947 commit 33e9fc7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ int ptrace_attach(struct task_struct *task)

__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);
Expand Down

0 comments on commit 33e9fc7

Please sign in to comment.