ptrace_attach: shift send(SIGSTOP) into ptrace_set_stopped()
authorOleg Nesterov <oleg@redhat.com>
Mon, 22 Jan 2024 17:16:31 +0000 (18:16 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 Feb 2024 23:38:52 +0000 (15:38 -0800)
commit08701813a1b439f01e52c10e66ee2e99d9d23c6c
tree2fa580f2642228f8f054a639a83ec76f093429ed
parentd6bbab8f352efb0533d3fa4af09bb60da770ecc5
ptrace_attach: shift send(SIGSTOP) into ptrace_set_stopped()

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 <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/ptrace.c