signal: Pass pid and pid type into send_sigqueue
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 20 Jul 2018 19:30:23 +0000 (14:30 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Sat, 21 Jul 2018 15:43:12 +0000 (10:43 -0500)
commit24122c7f4969adeeaeca3fb1656a31569e9aa59b
tree723eaf26f05f49f54df40fc6af0155f5eb880738
parent2118e1f53f6f0973a1d9a6a7dc9296959bf39ec0
signal: Pass pid and pid type into send_sigqueue

Make the code more maintainable by performing more of the signal
related work in send_sigqueue.

A quick inspection of do_timer_create will show that this code path
does not lookup a thread group by a thread's pid.  Making it safe
to find the task pointed to by it_pid with "pid_task(it_pid, type)";

This supports the changes needed in fork to tell if a signal was sent
to a single process or a group of processes.

Having the pid to task transition in signal.c will also make it easier
to sort out races with de_thread and and the thread group leader
exiting when it comes time to address that.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
include/linux/sched/signal.h
kernel/signal.c
kernel/time/posix-timers.c