From: Davide Libenzi Date: Fri, 11 Apr 2008 04:29:29 +0000 (-0700) Subject: signalfd: fix for incorrect SI_QUEUE user data reporting X-Git-Tag: v2.6.25-rc9~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0859ab59a8a48d2a96b9d2b7100889bcb6bb5818;p=linux-2.6-omap-h63xx.git 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 Acked-by: Michael Kerrisk Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/signalfd.c b/fs/signalfd.c index cb2b63ae0bf..8ead0db3593 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c @@ -111,9 +111,14 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo, err |= __put_user(kinfo->si_uid, &uinfo->ssi_uid); err |= __put_user((long) kinfo->si_ptr, &uinfo->ssi_ptr); break; - default: /* this is just in case for now ... */ + default: + /* + * This case catches also the signals queued by sigqueue(). + */ err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid); err |= __put_user(kinfo->si_uid, &uinfo->ssi_uid); + err |= __put_user((long) kinfo->si_ptr, &uinfo->ssi_ptr); + err |= __put_user(kinfo->si_int, &uinfo->ssi_int); break; }