Commit f149b315 authored by Eric W. Biederman's avatar Eric W. Biederman

signal: Never allocate siginfo for SIGKILL or SIGSTOP

The SIGKILL and SIGSTOP signals are never delivered to userspace so
queued siginfo for these signals can never be observed.  Therefore
remove the chance of failure by never even attempting to allocate
siginfo in those cases.
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent 03515054
...@@ -1054,10 +1054,11 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t, ...@@ -1054,10 +1054,11 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
result = TRACE_SIGNAL_DELIVERED; result = TRACE_SIGNAL_DELIVERED;
/* /*
* fast-pathed signals for kernel-internal things like SIGSTOP * Skip useless siginfo allocation for SIGKILL SIGSTOP,
* or SIGKILL. * and kernel threads.
*/ */
if ((info == SEND_SIG_FORCED) || (t->flags & PF_KTHREAD)) if ((info == SEND_SIG_FORCED) ||
sig_kernel_only(sig) || (t->flags & PF_KTHREAD))
goto out_set; goto out_set;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment