summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-11-24 01:55:09 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-11-24 01:55:09 +0400
commitf3a443af9e85d6c6c7e7506400024a85a8dd9496 (patch)
treeb165e0f429a5273d94709d759dcf6c46299a39b8 /arch
parent45aaff067997502aa4cd373f9e9f303661675430 (diff)
parentfae2ae2a900a5c7bb385fe4075f343e7e2d5daa2 (diff)
downloadlinux-f3a443af9e85d6c6c7e7506400024a85a8dd9496.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fix from David Miller: "Bug fix from Al Viro" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: not any error from do_sigaltstack() should fail rt_sigreturn()
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/signal_64.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/sparc/kernel/signal_64.c b/arch/sparc/kernel/signal_64.c
index 867de2f8189c..689e1ba62809 100644
--- a/arch/sparc/kernel/signal_64.c
+++ b/arch/sparc/kernel/signal_64.c
@@ -295,9 +295,7 @@ void do_rt_sigreturn(struct pt_regs *regs)
err |= restore_fpu_state(regs, fpu_save);
err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t));
- err |= do_sigaltstack(&sf->stack, NULL, (unsigned long)sf);
-
- if (err)
+ if (err || do_sigaltstack(&sf->stack, NULL, (unsigned long)sf) == -EFAULT)
goto segv;
err |= __get_user(rwin_save, &sf->rwin_save);