aboutsummaryrefslogtreecommitdiffstats
path: root/arch/c6x
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-03-05 07:43:56 -0500
committerRichard Weinberger <richard@sigma-star.at>2014-08-06 07:04:07 -0400
commit615869e40bc0f84bc73d43e83ab88a7d4b66759f (patch)
tree32da23eb2091211fbf26f152745c99baf918d976 /arch/c6x
parente90670a9629a68c1bf5bbb59d0077684f22a5cb9 (diff)
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>
Diffstat (limited to 'arch/c6x')
-rw-r--r--arch/c6x/kernel/signal.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/c6x/kernel/signal.c b/arch/c6x/kernel/signal.c
index 8bf9aad67cee..fe68226f6c4d 100644
--- a/arch/c6x/kernel/signal.c
+++ b/arch/c6x/kernel/signal.c
@@ -127,17 +127,11 @@ static int setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
127 return err; 127 return err;
128} 128}
129 129
130static inline void __user *get_sigframe(struct k_sigaction *ka, 130static inline void __user *get_sigframe(struct ksignal *ksig,
131 struct pt_regs *regs, 131 struct pt_regs *regs,
132 unsigned long framesize) 132 unsigned long framesize)
133{ 133{
134 unsigned long sp = regs->sp; 134 unsigned long sp = sigsp(regs->sp, ksig);
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;
141 135
142 /* 136 /*
143 * No matter what happens, 'sp' must be dword 137 * No matter what happens, 'sp' must be dword
@@ -153,7 +147,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
153 unsigned long __user *retcode; 147 unsigned long __user *retcode;
154 int err = 0; 148 int err = 0;
155 149
156 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame)); 150 frame = get_sigframe(ksig, regs, sizeof(*frame));
157 151
158 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) 152 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
159 return -EFAULT; 153 return -EFAULT;