Re: [PATCH v2] Relax si_code check in rt_sigqueueinfo and rt_tgsigqueueinfo

Oleg Nesterov
2011-03-29T13:28:48Z

On 03/28, Roland Dreier wrote:
>
> diff --git a/kernel/signal.c b/kernel/signal.c
> index 324eff5..b2bfa3a 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -2437,7 +2437,7 @@ SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig,
> /* Not even root can pretend to send signals from the kernel.
> * Nor can they impersonate a kill()/tgkill(), which adds source info.
> */
> - if (info.si_code != SI_QUEUE) {
> + if (info.si_code >= 0 || info.si_code == SI_TKILL) {
> /* We used to allow any < 0 si_code */
> WARN_ON_ONCE(info.si_code < 0);

This is equivalent to WARN_ON_ONCE(SI_TKILL)... doesn't matter, please ignore.

Thanks, I think -stable needs this patch asap. It turns out 2.6.32.36, 2.6.33.9,
2.6.37.6 and 2.6.38.2 pulled da48524eb20662618854bb3df2db01fc65f3070c.

If this change breaks something too, we can make even more conservative check.

Acked-by: Oleg Nesterov <oleg@redhat.com>