summaryrefslogtreecommitdiff
path: root/arch/mn10300
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-03-05 15:36:49 +0100
committerRichard Weinberger <richard@sigma-star.at>2014-08-06 13:04:31 +0200
commita8040ff82ee623bfd070b920fb4b5d133f9d9953 (patch)
tree6a9fd916491eb903b84bfade366602fa081263f4 /arch/mn10300
parent7c4f563507c33ca97dcfbd62dba1e9232575d499 (diff)
mn10300: Use sigsp()
Use sigsp() instead of the open coded variant. Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/mn10300')
-rw-r--r--arch/mn10300/kernel/signal.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c
index 0c97202764ce..a6c0858592c3 100644
--- a/arch/mn10300/kernel/signal.c
+++ b/arch/mn10300/kernel/signal.c
@@ -186,20 +186,11 @@ static int setup_sigcontext(struct sigcontext __user *sc,
/*
* determine which stack to use..
*/
-static inline void __user *get_sigframe(struct k_sigaction *ka,
+static inline void __user *get_sigframe(struct ksignal *ksig,
struct pt_regs *regs,
size_t frame_size)
{
- unsigned long sp;
-
- /* default to using normal stack */
- sp = regs->sp;
-
- /* 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;
- }
+ unsigned long sp = sigsp(regs->sp, ksig);
return (void __user *) ((sp - frame_size) & ~7UL);
}
@@ -213,7 +204,7 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
struct sigframe __user *frame;
int rsig, sig = ksig->sig;
- 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;
@@ -281,7 +272,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
struct rt_sigframe __user *frame;
int rsig, sig = ksig->sig;
- 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;