[PATCH] s390: bug in setup_rt_frame
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 1 May 2006 19:16:15 +0000 (12:16 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 2 May 2006 01:17:46 +0000 (18:17 -0700)
Consider return value of __put_user() when setting up a signal frame
instead of ignoring it.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/s390/kernel/signal.c

index ae1927e48cfb8fbef2fe082885245d3ed9c17e2a..d48cfc726b68d9e2fbe3b7968c2283dd476e71de 100644 (file)
@@ -358,8 +358,9 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
        } else {
                 regs->gprs[14] = (unsigned long)
                        frame->retcode | PSW_ADDR_AMODE;
-               err |= __put_user(S390_SYSCALL_OPCODE | __NR_rt_sigreturn,
-                                 (u16 __user *)(frame->retcode));
+               if (__put_user(S390_SYSCALL_OPCODE | __NR_rt_sigreturn,
+                              (u16 __user *)(frame->retcode)))
+                       goto give_sigsegv;
        }
 
        /* Set up backchain. */