From 615869e40bc0f84bc73d43e83ab88a7d4b66759f Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Wed, 5 Mar 2014 13:43:56 +0100 Subject: c6x: Use sigsp() Use sigsp() instead of the open coded variant. Signed-off-by: Richard Weinberger Acked-by: Mark Salter --- arch/c6x/kernel/signal.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'arch/c6x') diff --git a/arch/c6x/kernel/signal.c b/arch/c6x/kernel/signal.c index 8bf9aad67cee..fe68226f6c4d 100644 --- a/arch/c6x/kernel/signal.c +++ b/arch/c6x/kernel/signal.c @@ -127,17 +127,11 @@ static int setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, return err; } -static inline void __user *get_sigframe(struct k_sigaction *ka, +static inline void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, unsigned long framesize) { - unsigned long sp = regs->sp; - - /* - * This is the X/Open sanctioned signal stack switching. - */ - if ((ka->sa.sa_flags & SA_ONSTACK) && sas_ss_flags(sp) == 0) - sp = current->sas_ss_sp + current->sas_ss_size; + unsigned long sp = sigsp(regs->sp, ksig); /* * No matter what happens, 'sp' must be dword @@ -153,7 +147,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, unsigned long __user *retcode; int err = 0; - frame = get_sigframe(&ksig->ka, regs, sizeof(*frame)); + frame = get_sigframe(ksig, regs, sizeof(*frame)); if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) return -EFAULT; -- cgit v1.2.2