aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-03-05 09:32:52 -0500
committerRichard Weinberger <richard@sigma-star.at>2014-08-06 07:04:11 -0400
commitc001cd21c930ce393c492565d8722bf951564986 (patch)
tree1f1363bdb3bbad95433cf200b453db87ec81da3a
parentd83961b733519b43c31d13d8d35fd0f6c17aa31f (diff)
microblaze: Use sigsp()
Use sigsp() instead of the open coded variant. Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r--arch/microblaze/kernel/signal.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
index 83137e868e19..8955a3829cf0 100644
--- a/arch/microblaze/kernel/signal.c
+++ b/arch/microblaze/kernel/signal.c
@@ -145,13 +145,10 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
145 * Determine which stack to use.. 145 * Determine which stack to use..
146 */ 146 */
147static inline void __user * 147static inline void __user *
148get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) 148get_sigframe(struct ksignal *ksig, struct pt_regs *regs, size_t frame_size)
149{ 149{
150 /* Default to using normal stack */ 150 /* Default to using normal stack */
151 unsigned long sp = regs->r1; 151 unsigned long sp = sigsp(regs->r1, ksig);
152
153 if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && !on_sig_stack(sp))
154 sp = current->sas_ss_sp + current->sas_ss_size;
155 152
156 return (void __user *)((sp - frame_size) & -8UL); 153 return (void __user *)((sp - frame_size) & -8UL);
157} 154}
@@ -168,7 +165,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
168 pte_t *ptep; 165 pte_t *ptep;
169#endif 166#endif
170 167
171 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame)); 168 frame = get_sigframe(ksig, regs, sizeof(*frame));
172 169
173 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) 170 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
174 return -EFAULT; 171 return -EFAULT;