summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-11-23 11:55:09 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2012-11-23 11:55:09 -1000
commitf3a443af9e85d6c6c7e7506400024a85a8dd9496 (patch)
treeb165e0f429a5273d94709d759dcf6c46299a39b8
parent45aaff067997502aa4cd373f9e9f303661675430 (diff)
parentfae2ae2a900a5c7bb385fe4075f343e7e2d5daa2 (diff)
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()
-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 867de2f8189..689e1ba6280 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);