return 0;
 }
 
-static inline void ptrace_set_stopped(struct task_struct *task)
+static inline void ptrace_set_stopped(struct task_struct *task, bool seize)
 {
        guard(spinlock)(&task->sighand->siglock);
 
+       /* SEIZE doesn't trap tracee on attach */
+       if (!seize)
+               send_signal_locked(SIGSTOP, SEND_SIG_PRIV, task, PIDTYPE_PID);
        /*
         * If the task is already STOPPED, set JOBCTL_TRAP_STOP and
         * TRAPPING, and kick it so that it transits to TRACED.  TRAPPING
                                return -EPERM;
 
                        task->ptrace = flags;
-
                        ptrace_link(task, current);
-
-                       /* SEIZE doesn't trap tracee on attach */
-                       if (!seize)
-                               send_sig_info(SIGSTOP, SEND_SIG_PRIV, task);
-
-                       ptrace_set_stopped(task);
+                       ptrace_set_stopped(task, seize);
                }
        }