Commit c001cd21 authored by Richard Weinberger's avatar Richard Weinberger Committed by Richard Weinberger

microblaze: Use sigsp()

Use sigsp() instead of the open coded variant.
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent d83961b7
...@@ -145,13 +145,10 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, ...@@ -145,13 +145,10 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
* Determine which stack to use.. * Determine which stack to use..
*/ */
static inline void __user * static inline void __user *
get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) get_sigframe(struct ksignal *ksig, struct pt_regs *regs, size_t frame_size)
{ {
/* Default to using normal stack */ /* Default to using normal stack */
unsigned long sp = regs->r1; unsigned long sp = sigsp(regs->r1, ksig);
if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && !on_sig_stack(sp))
sp = current->sas_ss_sp + current->sas_ss_size;
return (void __user *)((sp - frame_size) & -8UL); return (void __user *)((sp - frame_size) & -8UL);
} }
...@@ -168,7 +165,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, ...@@ -168,7 +165,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
pte_t *ptep; pte_t *ptep;
#endif #endif
frame = get_sigframe(&ksig->ka, regs, sizeof(*frame)); frame = get_sigframe(ksig, regs, sizeof(*frame));
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
return -EFAULT; return -EFAULT;
......
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