signalfd: fix for incorrect SI_QUEUE user data reporting

Michael Kerrisk found out that signalfd was not reporting back user data
pushed using sigqueue:

http://groups.google.com/group/linux.kernel/msg/9397cab8551e3123

The following patch makes signalfd report back the ssi_ptr and ssi_int members
of the signalfd_siginfo structure.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Acked-by: Michael Kerrisk <mtk.manpages@googlemail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Davide Libenzi and committed by Linus Torvalds 0859ab59 544451a1

+6 -1
+6 -1
fs/signalfd.c
··· 111 111 err |= __put_user(kinfo->si_uid, &uinfo->ssi_uid); 112 112 err |= __put_user((long) kinfo->si_ptr, &uinfo->ssi_ptr); 113 113 break; 114 - default: /* this is just in case for now ... */ 114 + default: 115 + /* 116 + * This case catches also the signals queued by sigqueue(). 117 + */ 115 118 err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid); 116 119 err |= __put_user(kinfo->si_uid, &uinfo->ssi_uid); 120 + err |= __put_user((long) kinfo->si_ptr, &uinfo->ssi_ptr); 121 + err |= __put_user(kinfo->si_int, &uinfo->ssi_int); 117 122 break; 118 123 } 119 124