提交 33e9fc7d 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

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: NOleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 68cb9478
...@@ -208,8 +208,7 @@ int ptrace_attach(struct task_struct *task) ...@@ -208,8 +208,7 @@ int ptrace_attach(struct task_struct *task)
__ptrace_link(task, current); __ptrace_link(task, current);
force_sig_specific(SIGSTOP, task); send_sig_info(SIGSTOP, SEND_SIG_FORCED, task);
bad: bad:
write_unlock_irqrestore(&tasklist_lock, flags); write_unlock_irqrestore(&tasklist_lock, flags);
task_unlock(task); task_unlock(task);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册