Commit 065f31bd authored by Richard Weinberger's avatar Richard Weinberger Committed by Richard Weinberger

avr32: Use sigsp()

Use sigsp() instead of the open coded variant.
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Acked-by: default avatarHans-Christian Egtvedt <egtvedt@samfundet.no>
parent 38a7be3c
...@@ -127,12 +127,9 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs) ...@@ -127,12 +127,9 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs)
} }
static inline void __user * 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; unsigned long sp = sigsp(regs->sp, ksig);
if ((ka->sa.sa_flags & SA_ONSTACK) && !sas_ss_flags(sp))
sp = current->sas_ss_sp + current->sas_ss_size;
return (void __user *)((sp - framesize) & ~3); return (void __user *)((sp - framesize) & ~3);
} }
...@@ -143,7 +140,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) ...@@ -143,7 +140,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
struct rt_sigframe __user *frame; struct rt_sigframe __user *frame;
int err = 0; int err = 0;
frame = get_sigframe(&ksig->ka, regs, sizeof(*frame)); frame = get_sigframe(ksig, regs, sizeof(*frame));
err = -EFAULT; err = -EFAULT;
if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment