2185 如果may_ptrace_stop()则 2196 do_notify_parent_cldstop - notify parent of stopped/continued state change*@tsk: task reporting the state change*@for_ptracer: the notification is for ptracer*@why: CLD_{CONTINUED|STOPPED|TRAPPED} to report 2197 如果gstop_done且ptrace_reparented(当前进程)...
arch_ptrace_stop(exit_code, info); spin_lock_irq(¤t->sighand->siglock); if(sigkill_pending(current)) return; } set_special_state(TASK_TRACED); /* * We're committing to trapping. TRACED should be visible before * TRAPPING is cleared; otherwise, the tracer might fail do_wait(). ...
Turn send_sig_info(SIGSTOP) into send_signal_locked(SIGSTOP) and move it from ptrace_attach() to ptrace_set_stopped(). This looks more logical and avoids lock(siglock) right after unlock(). Link: https://lkml.kernel.org/r/20240122171631.GA29844@redhat.com Signed-off-by: Oleg Nesterov...