aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/signal_32.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-09-04 05:53:58 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-09-07 21:35:04 -0400
commitfa43972fab24a3c050e880a7831f9378c6cebc0b (patch)
tree35d51e6a0ac6556f82d843506e8317854dc3192c /arch/sh/kernel/signal_32.c
parent7d96169cb769f459dd6730b06fa3a88cb0c9297d (diff)
sh: fixup many sparse errors.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/signal_32.c')
-rw-r--r--arch/sh/kernel/signal_32.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c
index 51689d29ad45..345de2f1d53c 100644
--- a/arch/sh/kernel/signal_32.c
+++ b/arch/sh/kernel/signal_32.c
@@ -30,6 +30,7 @@
30#include <asm/uaccess.h> 30#include <asm/uaccess.h>
31#include <asm/pgtable.h> 31#include <asm/pgtable.h>
32#include <asm/cacheflush.h> 32#include <asm/cacheflush.h>
33#include <asm/syscalls.h>
33#include <asm/fpu.h> 34#include <asm/fpu.h>
34 35
35#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 36#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
@@ -247,7 +248,6 @@ asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
247 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 248 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
248 struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs->regs[15]; 249 struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs->regs[15];
249 sigset_t set; 250 sigset_t set;
250 stack_t st;
251 int r0; 251 int r0;
252 252
253 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 253 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
@@ -265,11 +265,9 @@ asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
265 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0)) 265 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0))
266 goto badframe; 266 goto badframe;
267 267
268 if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st))) 268 if (do_sigaltstack(&frame->uc.uc_stack, NULL,
269 regs->regs[15]) == -EFAULT)
269 goto badframe; 270 goto badframe;
270 /* It is more difficult to avoid calling this function than to
271 call it and ignore errors. */
272 do_sigaltstack((const stack_t __user *)&st, NULL, (unsigned long)frame);
273 271
274 return r0; 272 return r0;
275 273
@@ -429,7 +427,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
429 427
430 /* Create the ucontext. */ 428 /* Create the ucontext. */
431 err |= __put_user(0, &frame->uc.uc_flags); 429 err |= __put_user(0, &frame->uc.uc_flags);
432 err |= __put_user(0, &frame->uc.uc_link); 430 err |= __put_user(NULL, &frame->uc.uc_link);
433 err |= __put_user((void *)current->sas_ss_sp, 431 err |= __put_user((void *)current->sas_ss_sp,
434 &frame->uc.uc_stack.ss_sp); 432 &frame->uc.uc_stack.ss_sp);
435 err |= __put_user(sas_ss_flags(regs->regs[15]), 433 err |= __put_user(sas_ss_flags(regs->regs[15]),