aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2014-05-07 10:47:09 -0400
committerOleg Nesterov <oleg@redhat.com>2014-05-14 07:57:26 -0400
commit38cad57be9800e46c52a3612fb9d963eee4fd9c3 (patch)
treeee716f7a87c1edd96f7f8705fd09362689492aec
parent5e1b05beeca8139204324581a5b1ffb53d057f96 (diff)
x86/traps: Use SEND_SIG_PRIV instead of force_sig()
force_sig() is just force_sig_info(SEND_SIG_PRIV). Imho it should die, we have too many ugly "send signal" helpers. And do_trap() looks just ugly because it uses force_sig_info() or force_sig() depending on info != NULL. Signed-off-by: Oleg Nesterov <oleg@redhat.com>
-rw-r--r--arch/x86/kernel/traps.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 8eddd628326e..2cd429117a41 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -168,10 +168,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
168 } 168 }
169#endif 169#endif
170 170
171 if (info) 171 force_sig_info(signr, info ?: SEND_SIG_PRIV, tsk);
172 force_sig_info(signr, info, tsk);
173 else
174 force_sig(signr, tsk);
175} 172}
176 173
177#define DO_ERROR(trapnr, signr, str, name) \ 174#define DO_ERROR(trapnr, signr, str, name) \
@@ -305,7 +302,7 @@ do_general_protection(struct pt_regs *regs, long error_code)
305 pr_cont("\n"); 302 pr_cont("\n");
306 } 303 }
307 304
308 force_sig(SIGSEGV, tsk); 305 force_sig_info(SIGSEGV, SEND_SIG_PRIV, tsk);
309exit: 306exit:
310 exception_exit(prev_state); 307 exception_exit(prev_state);
311} 308}
@@ -645,7 +642,7 @@ void math_state_restore(void)
645 */ 642 */
646 if (unlikely(restore_fpu_checking(tsk))) { 643 if (unlikely(restore_fpu_checking(tsk))) {
647 drop_init_fpu(tsk); 644 drop_init_fpu(tsk);
648 force_sig(SIGSEGV, tsk); 645 force_sig_info(SIGSEGV, SEND_SIG_PRIV, tsk);
649 return; 646 return;
650 } 647 }
651 648