summaryrefslogtreecommitdiffstats
path: root/arch/m32r
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-03-05 15:27:15 +0100
committerRichard Weinberger <richard@sigma-star.at>2014-08-06 13:04:09 +0200
commit5c0806faf1a3837db38542c3bae085f23beac7f1 (patch)
tree6b84122c383c480a05c15ac710afe69de36b8a3a /arch/m32r
parent8bc77aa45e8383e760f1a7edd12ed4d077a068d8 (diff)
downloadlinux-5c0806faf1a3837db38542c3bae085f23beac7f1.tar.bz2
m32r: Use sigsp()
Use sigsp() instead of the open coded variant. Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/m32r')
-rw-r--r--arch/m32r/kernel/signal.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c
index cce3fd3ae923..95408b8f130a 100644
--- a/arch/m32r/kernel/signal.c
+++ b/arch/m32r/kernel/signal.c
@@ -162,15 +162,9 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
* Determine which stack to use..
*/
static inline void __user *
-get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
+get_sigframe(struct ksignal *ksig, unsigned long sp, size_t frame_size)
{
- /* This is the X/Open sanctioned signal stack switching. */
- if (ka->sa.sa_flags & SA_ONSTACK) {
- if (sas_ss_flags(sp) == 0)
- sp = current->sas_ss_sp + current->sas_ss_size;
- }
-
- return (void __user *)((sp - frame_size) & -8ul);
+ return (void __user *)((sigsp(sp, ksig) - frame_size) & -8ul);
}
static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
@@ -180,7 +174,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
int err = 0;
int signal, sig = ksig->sig;
- frame = get_sigframe(&ksig->ka, regs->spu, sizeof(*frame));
+ frame = get_sigframe(ksig, regs->spu, sizeof(*frame));
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
return -EFAULT;