diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/signal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 324eff5468ad..1186cf7fac77 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -2437,7 +2437,7 @@ SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig, | |||
2437 | /* Not even root can pretend to send signals from the kernel. | 2437 | /* Not even root can pretend to send signals from the kernel. |
2438 | * Nor can they impersonate a kill()/tgkill(), which adds source info. | 2438 | * Nor can they impersonate a kill()/tgkill(), which adds source info. |
2439 | */ | 2439 | */ |
2440 | if (info.si_code != SI_QUEUE) { | 2440 | if (info.si_code >= 0 || info.si_code == SI_TKILL) { |
2441 | /* We used to allow any < 0 si_code */ | 2441 | /* We used to allow any < 0 si_code */ |
2442 | WARN_ON_ONCE(info.si_code < 0); | 2442 | WARN_ON_ONCE(info.si_code < 0); |
2443 | return -EPERM; | 2443 | return -EPERM; |
@@ -2457,7 +2457,7 @@ long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, siginfo_t *info) | |||
2457 | /* Not even root can pretend to send signals from the kernel. | 2457 | /* Not even root can pretend to send signals from the kernel. |
2458 | * Nor can they impersonate a kill()/tgkill(), which adds source info. | 2458 | * Nor can they impersonate a kill()/tgkill(), which adds source info. |
2459 | */ | 2459 | */ |
2460 | if (info->si_code != SI_QUEUE) { | 2460 | if (info->si_code >= 0 || info->si_code == SI_TKILL) { |
2461 | /* We used to allow any < 0 si_code */ | 2461 | /* We used to allow any < 0 si_code */ |
2462 | WARN_ON_ONCE(info->si_code < 0); | 2462 | WARN_ON_ONCE(info->si_code < 0); |
2463 | return -EPERM; | 2463 | return -EPERM; |