]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
score: do_sigaltstack() expects a userland pointer...
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 20 Nov 2012 15:36:17 +0000 (10:36 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 29 Nov 2012 02:46:12 +0000 (21:46 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/score/kernel/signal.c

index c268bbf8b41047b2717a5a41a7ed86178a7df24e..02353bde92d883c3aeb0557ba423e0e3c16edfad 100644 (file)
@@ -148,7 +148,6 @@ score_rt_sigreturn(struct pt_regs *regs)
 {
        struct rt_sigframe __user *frame;
        sigset_t set;
-       stack_t st;
        int sig;
 
        /* Always make any pending restarted system calls return -EINTR */
@@ -168,12 +167,10 @@ score_rt_sigreturn(struct pt_regs *regs)
        else if (sig)
                force_sig(sig, current);
 
-       if (__copy_from_user(&st, &frame->rs_uc.uc_stack, sizeof(st)))
-               goto badframe;
-
        /* It is more difficult to avoid calling this function than to
           call it and ignore errors.  */
-       do_sigaltstack((stack_t __user *)&st, NULL, regs->regs[0]);
+       if (do_sigaltstack(&frame->rs_uc.uc_stack, NULL, regs->regs[0]) == -EFAULT)
+               goto badframe;
        regs->is_syscall = 0;
 
        __asm__ __volatile__(