]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit - include/linux/sched/signal.h
signal: Use force_sig_fault_to_task for the two calls that don't deliver to current
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 6 Feb 2019 22:39:13 +0000 (16:39 -0600)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 29 May 2019 14:31:43 +0000 (09:31 -0500)
commit91ca180dbdd687d45fe4aab055b02d29c91b90df
tree468888ea5dfa8f2177bbd62efcefe6484fb3870f
parent351b6825b3a9f70bab080fba67aec104ff9a41d6
signal: Use force_sig_fault_to_task for the two calls that don't deliver to current

In preparation for removing the task parameter from force_sig_fault
introduce force_sig_fault_to_task and use it for the two cases where
it matters.

On mips force_fcr31_sig calls force_sig_fault and is called on either
the current task, or a task that is suspended and is being switched to
by the scheduler.  This is safe because the task being switched to by
the scheduler is guaranteed to be suspended.  This ensures that
task->sighand is stable while the signal is delivered to it.

On parisc user_enable_single_step calls force_sig_fault and is in turn
called by ptrace_request.  The function ptrace_request always calls
user_enable_single_step on a child that is stopped for tracing.  The
child being traced and not reaped ensures that child->sighand is not
NULL, and that the child will not change child->sighand.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
arch/mips/kernel/traps.c
arch/parisc/kernel/ptrace.c
include/linux/sched/signal.h
kernel/signal.c