summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-03-05 13:34:54 +0100
committerRichard Weinberger <richard@sigma-star.at>2014-08-06 13:03:46 +0200
commit065f31bd263b61b1fbf6c0ae4e7c0d3cf7373b10 (patch)
treeb6908b8da5108a7f4eb498b17e664bb27f5da730 /arch
parent38a7be3c280bb9f9c4c892cf5ff51c847e959cf1 (diff)
downloadlinux-065f31bd263b61b1fbf6c0ae4e7c0d3cf7373b10.tar.bz2
avr32: Use sigsp()
Use sigsp() instead of the open coded variant. Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Diffstat (limited to 'arch')
-rw-r--r--arch/avr32/kernel/signal.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c
index dda150fe73bb..d309fbcc3bd6 100644
--- a/arch/avr32/kernel/signal.c
+++ b/arch/avr32/kernel/signal.c
@@ -127,12 +127,9 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs)
}
static inline void __user *
-get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, int framesize)
+get_sigframe(struct ksignal *ksig, struct pt_regs *regs, int framesize)
{
- unsigned long sp = regs->sp;
-
- if ((ka->sa.sa_flags & SA_ONSTACK) && !sas_ss_flags(sp))
- sp = current->sas_ss_sp + current->sas_ss_size;
+ unsigned long sp = sigsp(regs->sp, ksig);
return (void __user *)((sp - framesize) & ~3);
}
@@ -143,7 +140,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
struct rt_sigframe __user *frame;
int err = 0;
- frame = get_sigframe(&ksig->ka, regs, sizeof(*frame));
+ frame = get_sigframe(ksig, regs, sizeof(*frame));
err = -EFAULT;
if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))
goto out;