aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/signal_n32.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-09 04:29:00 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-09 04:29:00 -0500
commit9caafa6c8686e319cf4d5f3757b3972c6c522b7c (patch)
treeb38979b835b5d22e681b175d0b98a3c7560d9c59 /arch/mips/kernel/signal_n32.c
parent[libata sata_sil] implement 'slow_down' module parameter (diff)
parentMerge branch 'master' (diff)
downloadlinux-dev-9caafa6c8686e319cf4d5f3757b3972c6c522b7c.tar.xz
linux-dev-9caafa6c8686e319cf4d5f3757b3972c6c522b7c.zip
Merge branch 'upstream-fixes'
Diffstat (limited to 'arch/mips/kernel/signal_n32.c')
-rw-r--r--arch/mips/kernel/signal_n32.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c
index ec61b2670ba6..384fc4a639a4 100644
--- a/arch/mips/kernel/signal_n32.c
+++ b/arch/mips/kernel/signal_n32.c
@@ -48,6 +48,8 @@
#define __NR_N32_rt_sigreturn 6211
#define __NR_N32_restart_syscall 6214
+#define DEBUG_SIG 0
+
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
/* IRIX compatible stack_t */
@@ -83,12 +85,12 @@ save_static_function(sysn32_rt_sigreturn);
__attribute_used__ noinline static void
_sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
{
- struct rt_sigframe_n32 *frame;
+ struct rt_sigframe_n32 __user *frame;
sigset_t set;
stack_t st;
s32 sp;
- frame = (struct rt_sigframe_n32 *) regs.regs[29];
+ frame = (struct rt_sigframe_n32 __user *) regs.regs[29];
if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
goto badframe;
if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set)))
@@ -114,7 +116,7 @@ _sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
/* It is more difficult to avoid calling this function than to
call it and ignore errors. */
- do_sigaltstack(&st, NULL, regs.regs[29]);
+ do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]);
/*
* Don't let your children do this ...
@@ -133,7 +135,7 @@ badframe:
int setup_rt_frame_n32(struct k_sigaction * ka,
struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info)
{
- struct rt_sigframe_n32 *frame;
+ struct rt_sigframe_n32 __user *frame;
int err = 0;
s32 sp;
@@ -184,9 +186,9 @@ int setup_rt_frame_n32(struct k_sigaction * ka,
current->comm, current->pid,
frame, regs->cp0_epc, regs->regs[31]);
#endif
- return 1;
+ return 0;
give_sigsegv:
force_sigsegv(signr, current);
- return 0;
+ return -EFAULT;
}