Skip to content

Commit

Permalink
x86/traps: Use SEND_SIG_PRIV instead of force_sig()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oleg Nesterov committed May 14, 2014
1 parent 5e1b05b commit 38cad57
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions arch/x86/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
}
#endif

if (info)
force_sig_info(signr, info, tsk);
else
force_sig(signr, tsk);
force_sig_info(signr, info ?: SEND_SIG_PRIV, tsk);
}

#define DO_ERROR(trapnr, signr, str, name) \
Expand Down Expand Up @@ -305,7 +302,7 @@ do_general_protection(struct pt_regs *regs, long error_code)
pr_cont("\n");
}

force_sig(SIGSEGV, tsk);
force_sig_info(SIGSEGV, SEND_SIG_PRIV, tsk);
exit:
exception_exit(prev_state);
}
Expand Down Expand Up @@ -645,7 +642,7 @@ void math_state_restore(void)
*/
if (unlikely(restore_fpu_checking(tsk))) {
drop_init_fpu(tsk);
force_sig(SIGSEGV, tsk);
force_sig_info(SIGSEGV, SEND_SIG_PRIV, tsk);
return;
}

Expand Down

0 comments on commit 38cad57

Please sign in to comment.