diff options
author | Richard Weinberger <richard@nod.at> | 2014-03-05 15:31:04 +0100 |
---|---|---|
committer | Richard Weinberger <richard@sigma-star.at> | 2014-08-06 13:04:10 +0200 |
commit | d83961b733519b43c31d13d8d35fd0f6c17aa31f (patch) | |
tree | c0b563e0a7a22d43e84ad99677b04f6a04607d80 | |
parent | 36992f2893d224add9a1e4b9114aa04f4640853b (diff) | |
download | op-kernel-dev-d83961b733519b43c31d13d8d35fd0f6c17aa31f.zip op-kernel-dev-d83961b733519b43c31d13d8d35fd0f6c17aa31f.tar.gz |
metag: Use sigsp()
Use sigsp() instead of the open coded variant.
Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: James Hogan <james.hogan@imgtec.com>
-rw-r--r-- | arch/metag/kernel/signal.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/metag/kernel/signal.c b/arch/metag/kernel/signal.c index b9e4a82..0d100d5 100644 --- a/arch/metag/kernel/signal.c +++ b/arch/metag/kernel/signal.c @@ -140,13 +140,9 @@ static int setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, /* * Determine which stack to use.. */ -static void __user *get_sigframe(struct k_sigaction *ka, unsigned long sp, - size_t frame_size) +static void __user *get_sigframe(struct ksignal *ksig, unsigned long sp) { - /* Meta stacks grows upwards */ - if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0)) - sp = current->sas_ss_sp; - + sp = sigsp(sp, ksig); sp = (sp + 7) & ~7; /* 8byte align stack */ return (void __user *)sp; @@ -159,7 +155,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, int err; unsigned long code; - frame = get_sigframe(&ksig->ka, regs->REG_SP, sizeof(*frame)); + frame = get_sigframe(ksig, regs->REG_SP); if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) return -EFAULT; |