aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 56d27acad87e..f79b3b9f8375 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2369,6 +2369,32 @@ SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig,
2369 return kill_proc_info(sig, &info, pid); 2369 return kill_proc_info(sig, &info, pid);
2370} 2370}
2371 2371
2372long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, siginfo_t *info)
2373{
2374 /* This is only valid for single tasks */
2375 if (pid <= 0 || tgid <= 0)
2376 return -EINVAL;
2377
2378 /* Not even root can pretend to send signals from the kernel.
2379 Nor can they impersonate a kill(), which adds source info. */
2380 if (info->si_code >= 0)
2381 return -EPERM;
2382 info->si_signo = sig;
2383
2384 return do_send_specific(tgid, pid, sig, info);
2385}
2386
2387SYSCALL_DEFINE4(rt_tgsigqueueinfo, pid_t, tgid, pid_t, pid, int, sig,
2388 siginfo_t __user *, uinfo)
2389{
2390 siginfo_t info;
2391
2392 if (copy_from_user(&info, uinfo, sizeof(siginfo_t)))
2393 return -EFAULT;
2394
2395 return do_rt_tgsigqueueinfo(tgid, pid, sig, &info);
2396}
2397
2372int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) 2398int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
2373{ 2399{
2374 struct task_struct *t = current; 2400 struct task_struct *t = current;