Skip to content

Commit 615869e

Browse files
c6x: Use sigsp()
Use sigsp() instead of the open coded variant. Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Mark Salter <msalter@redhat.com>
1 parent e90670a commit 615869e

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

‎arch/c6x/kernel/signal.c‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,11 @@ static int setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
127127
return err;
128128
}
129129

130-
static inline void __user *get_sigframe(struct k_sigaction *ka,
130+
static inline void __user *get_sigframe(struct ksignal *ksig,
131131
struct pt_regs *regs,
132132
unsigned long framesize)
133133
{
134-
unsigned long sp = regs->sp;
135-
136-
/*
137-
* This is the X/Open sanctioned signal stack switching.
138-
*/
139-
if ((ka->sa.sa_flags & SA_ONSTACK) && sas_ss_flags(sp) == 0)
140-
sp = current->sas_ss_sp + current->sas_ss_size;
134+
unsigned long sp = sigsp(regs->sp, ksig);
141135

142136
/*
143137
* No matter what happens, 'sp' must be dword
@@ -153,7 +147,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
153147
unsigned long __user *retcode;
154148
int err = 0;
155149

156-
frame = get_sigframe(&ksig->ka, regs, sizeof(*frame));
150+
frame = get_sigframe(ksig, regs, sizeof(*frame));
157151

158152
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
159153
return -EFAULT;

0 commit comments

Comments
 (0)