From: Jurij Smakov Date: Mon, 18 Apr 2005 01:03:12 +0000 (-0700) Subject: [PATCH] sparc64: Fix copy_sigingo_to_user32() X-Git-Tag: v2.6.12-rc3~27^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c7d3b3a6b6aaeded9d9e5c5111dbcc65b0b0f91;p=linux-2.6 [PATCH] sparc64: Fix copy_sigingo_to_user32() The compat routine to copy over this data structure was not handling SI_POLL correctly, breaking various fcntl() variants in compat tasks. Signed-off-by: David S. Miller Signed-off-by: Linus Torvalds --- diff --git a/arch/sparc64/kernel/signal32.c b/arch/sparc64/kernel/signal32.c index 859255cf67..9a375e975c 100644 --- a/arch/sparc64/kernel/signal32.c +++ b/arch/sparc64/kernel/signal32.c @@ -192,10 +192,13 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) err |= __put_user(from->si_uid, &to->si_uid); break; case __SI_FAULT >> 16: - case __SI_POLL >> 16: err |= __put_user(from->si_trapno, &to->si_trapno); err |= __put_user((unsigned long)from->si_addr, &to->si_addr); break; + case __SI_POLL >> 16: + err |= __put_user(from->si_band, &to->si_band); + err |= __put_user(from->si_fd, &to->si_fd); + break; case __SI_RT >> 16: /* This is not generated by the kernel as of now. */ case __SI_MESGQ >> 16: err |= __put_user(from->si_pid, &to->si_pid);