瀏覽代碼

arc: Use sigsp()

Use sigsp() instead of the open coded variant.

Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Richard Weinberger 11 年之前
父節點
當前提交
5290dd79c0
共有 1 個文件被更改,包括 3 次插入7 次删除
  1. 3 7
      arch/arc/kernel/signal.c

+ 3 - 7
arch/arc/kernel/signal.c

@@ -141,17 +141,13 @@ badframe:
 /*
 /*
  * Determine which stack to use..
  * 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,
 					struct pt_regs *regs,
 					unsigned long framesize)
 					unsigned long framesize)
 {
 {
-	unsigned long sp = regs->sp;
+	unsigned long sp = sigsp(regs->sp, ksig);
 	void __user *frame;
 	void __user *frame;
 
 
-	/* This is the X/Open sanctioned signal stack switching */
-	if ((ka->sa.sa_flags & SA_ONSTACK) && !sas_ss_flags(sp))
-		sp = current->sas_ss_sp + current->sas_ss_size;
-
 	/* No matter what happens, 'sp' must be word
 	/* No matter what happens, 'sp' must be word
 	 * aligned otherwise nasty things could happen
 	 * aligned otherwise nasty things could happen
 	 */
 	 */
@@ -185,7 +181,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
 	unsigned int magic = 0;
 	unsigned int magic = 0;
 	int err = 0;
 	int err = 0;
 
 
-	sf = get_sigframe(&ksig->ka, regs, sizeof(struct rt_sigframe));
+	sf = get_sigframe(ksig, regs, sizeof(struct rt_sigframe));
 	if (!sf)
 	if (!sf)
 		return 1;
 		return 1;