Skip to contentSkip to conversation

ptrace: ptrace_attach: use send_sig_info() instead force_sig_specific()

PATCH In review Oleg Nesterov 2 participants 2 messages Mar 19, 2008 ptrace support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ptrace: ptrace_attach: use send_sig_info() instead force_sig_specific()

(depends on signals-send_sig_info-dont-take-tasklist_lock.patch)

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.

kernel/ptrace.c renamed from kernel/ptrace.c~5_PTRACE_STOP_NO_FORCE +1 -2
@@ -217,8 +217,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);