Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satoru-takeuchi/793ee99434b53e428359da13aa84017b to your computer and use it in GitHub Desktop.
Save satoru-takeuchi/793ee99434b53e428359da13aa84017b to your computer and use it in GitHub Desktop.
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 4e49637..1653a73 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -514,10 +514,9 @@ do_general_protection(struct pt_regs *regs, long error_code)
tsk->thread.error_code = error_code;
tsk->thread.trap_nr = X86_TRAP_GP;
- if (show_unhandled_signals && unhandled_signal(tsk, SIGSEGV) &&
- printk_ratelimit()) {
- pr_info("%s[%d] general protection ip:%lx sp:%lx error:%lx",
- tsk->comm, task_pid_nr(tsk),
+ if (show_unhandled_signals) {
+ pr_err("CPU%u: %s[%d] general protection ip:%lx sp:%lx error:%lx",
+ tsk->cpu, tsk->comm, task_pid_nr(tsk),
regs->ip, regs->sp, error_code);
print_vma_addr(KERN_CONT " in ", regs->ip);
pr_cont("\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment