Home Home > GIT Browse
diff options
authorDavid Howells <dhowells@redhat.com>2005-02-10 16:19:59 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-02-10 16:19:59 -0800
commit96b39b5b8319493fe648f6938b6171411fe75168 (patch)
parent8b1ef6f51b16ed94db86979fadc87a13647b051b (diff)
[PATCH] FRV: Fix sigaltstack handling for RT signals
The attached patch fixes sigaltstack handling for RT signal return. It was reading a userspace struct into kernel space and then passing the kernel copy to a generic signalling routine which then assumed it had been passed a userspace pointer... Signed-Off-By: David Howells <dhowells@redhat.com> Signed-Off-By: Alexander Viro <aviro@redhat.com> Signed-Off-By: Linus Torvalds <torvalds@osdl.org>
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c
index 6be84f67df31..1fccc1cc531d 100644
--- a/arch/frv/kernel/signal.c
+++ b/arch/frv/kernel/signal.c
@@ -242,18 +242,9 @@ asmlinkage int sys_rt_sigreturn(void)
if (restore_sigcontext(&frame->uc.uc_mcontext, &gr8))
goto badframe;
- if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
+ if (do_sigaltstack(&frame->uc.uc_stack, NULL, __frame->sp) == -EFAULT)
goto badframe;
- /* It is more difficult to avoid calling this function than to
- * call it and ignore errors. */
- /*
- * THIS CANNOT WORK! "&st" is a kernel address, and "do_sigaltstack()"
- * takes a user address (and verifies that it is a user address). End
- * result: it does exactly _nothing_.
- */
- do_sigaltstack(&st, NULL, __frame->sp);
return gr8;