Skip to content

Commit

Permalink
c6x: Use sigsp()
Browse files Browse the repository at this point in the history
Use sigsp() instead of the open coded variant.

Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Mark Salter <msalter@redhat.com>
  • Loading branch information
richardweinberger committed Aug 6, 2014
1 parent e90670a commit 615869e
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions arch/c6x/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 615869e

Please sign in to comment.