From: Andrew Morton Date: Thu, 7 Feb 2013 01:27:54 +0000 (+1100) Subject: signal-allow-to-send-any-siginfo-to-itself-fix X-Git-Tag: next-20130218~1^2~180 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b41cb1adbac8652109aabfccaf5cc8a6b69119f8;p=karo-tx-linux.git signal-allow-to-send-any-siginfo-to-itself-fix Cc: Andrey Vagin Signed-off-by: Andrew Morton --- diff --git a/kernel/signal.c b/kernel/signal.c index 09934910643c..c6209135cca4 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -3046,7 +3046,7 @@ static int do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, siginfo_t *info) /* 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 >= 0 || info.si_code == SI_TKILL)) && + if (((info->si_code >= 0 || info->si_code == SI_TKILL)) && (task_pid_vnr(current) != pid)) { /* We used to allow any < 0 si_code */ WARN_ON_ONCE(info->si_code < 0);