diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2019-05-15 11:11:09 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2019-05-29 10:31:44 -0400 |
commit | a89e9b8abf82725e4ac96100e07c8104dbe8a240 (patch) | |
tree | a25fe1216ab1148b3991afc738c237716e1440c3 /kernel/signal.c | |
parent | 59c0e696a6c0fe6a8d718a43aecd72347db6a7f0 (diff) |
signal: Remove the signal number and task parameters from force_sig_info
force_sig_info always delivers to the current task and the signal
parameter always matches info.si_signo. So remove those parameters to
make it a simpler less error prone interface, and to make it clear
that none of the callers are doing anything clever.
This guarantees that force_sig_info will not grow any new buggy
callers that attempt to call force_sig on a non-current task, or that
pass an signal number that does not match info.si_signo.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 0984158cd41a..ff6944e4964e 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1325,9 +1325,9 @@ force_sig_info_to_task(struct kernel_siginfo *info, struct task_struct *t) | |||
1325 | return ret; | 1325 | return ret; |
1326 | } | 1326 | } |
1327 | 1327 | ||
1328 | int force_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *t) | 1328 | int force_sig_info(struct kernel_siginfo *info) |
1329 | { | 1329 | { |
1330 | return force_sig_info_to_task(info, t); | 1330 | return force_sig_info_to_task(info, current); |
1331 | } | 1331 | } |
1332 | 1332 | ||
1333 | /* | 1333 | /* |
@@ -1619,7 +1619,7 @@ void force_sig(int sig) | |||
1619 | info.si_code = SI_KERNEL; | 1619 | info.si_code = SI_KERNEL; |
1620 | info.si_pid = 0; | 1620 | info.si_pid = 0; |
1621 | info.si_uid = 0; | 1621 | info.si_uid = 0; |
1622 | force_sig_info(info.si_signo, &info, current); | 1622 | force_sig_info(&info); |
1623 | } | 1623 | } |
1624 | EXPORT_SYMBOL(force_sig); | 1624 | EXPORT_SYMBOL(force_sig); |
1625 | 1625 | ||
@@ -1708,7 +1708,7 @@ int force_sig_mceerr(int code, void __user *addr, short lsb) | |||
1708 | info.si_code = code; | 1708 | info.si_code = code; |
1709 | info.si_addr = addr; | 1709 | info.si_addr = addr; |
1710 | info.si_addr_lsb = lsb; | 1710 | info.si_addr_lsb = lsb; |
1711 | return force_sig_info(info.si_signo, &info, current); | 1711 | return force_sig_info(&info); |
1712 | } | 1712 | } |
1713 | 1713 | ||
1714 | int send_sig_mceerr(int code, void __user *addr, short lsb, struct task_struct *t) | 1714 | int send_sig_mceerr(int code, void __user *addr, short lsb, struct task_struct *t) |
@@ -1737,7 +1737,7 @@ int force_sig_bnderr(void __user *addr, void __user *lower, void __user *upper) | |||
1737 | info.si_addr = addr; | 1737 | info.si_addr = addr; |
1738 | info.si_lower = lower; | 1738 | info.si_lower = lower; |
1739 | info.si_upper = upper; | 1739 | info.si_upper = upper; |
1740 | return force_sig_info(info.si_signo, &info, current); | 1740 | return force_sig_info(&info); |
1741 | } | 1741 | } |
1742 | 1742 | ||
1743 | #ifdef SEGV_PKUERR | 1743 | #ifdef SEGV_PKUERR |
@@ -1751,7 +1751,7 @@ int force_sig_pkuerr(void __user *addr, u32 pkey) | |||
1751 | info.si_code = SEGV_PKUERR; | 1751 | info.si_code = SEGV_PKUERR; |
1752 | info.si_addr = addr; | 1752 | info.si_addr = addr; |
1753 | info.si_pkey = pkey; | 1753 | info.si_pkey = pkey; |
1754 | return force_sig_info(info.si_signo, &info, current); | 1754 | return force_sig_info(&info); |
1755 | } | 1755 | } |
1756 | #endif | 1756 | #endif |
1757 | 1757 | ||
@@ -1767,7 +1767,7 @@ int force_sig_ptrace_errno_trap(int errno, void __user *addr) | |||
1767 | info.si_errno = errno; | 1767 | info.si_errno = errno; |
1768 | info.si_code = TRAP_HWBKPT; | 1768 | info.si_code = TRAP_HWBKPT; |
1769 | info.si_addr = addr; | 1769 | info.si_addr = addr; |
1770 | return force_sig_info(info.si_signo, &info, current); | 1770 | return force_sig_info(&info); |
1771 | } | 1771 | } |
1772 | 1772 | ||
1773 | int kill_pgrp(struct pid *pid, int sig, int priv) | 1773 | int kill_pgrp(struct pid *pid, int sig, int priv) |