aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/traps_32.c30
-rw-r--r--arch/x86/kernel/traps_64.c4
2 files changed, 15 insertions, 19 deletions
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index 5339af459a38..5afd94a01b98 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -399,26 +399,22 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
399 printk("DEBUG_PAGEALLOC"); 399 printk("DEBUG_PAGEALLOC");
400#endif 400#endif
401 printk("\n"); 401 printk("\n");
402
403 if (notify_die(DIE_OOPS, str, regs, err, 402 if (notify_die(DIE_OOPS, str, regs, err,
404 current->thread.trap_no, SIGSEGV) != NOTIFY_STOP) { 403 current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
405 404 return 1;
406 show_registers(regs);
407 /* Executive summary in case the oops scrolled away */
408 sp = (unsigned long) (&regs->sp);
409 savesegment(ss, ss);
410 if (user_mode(regs)) {
411 sp = regs->sp;
412 ss = regs->ss & 0xffff;
413 }
414 printk(KERN_EMERG "EIP: [<%08lx>] ", regs->ip);
415 print_symbol("%s", regs->ip);
416 printk(" SS:ESP %04x:%08lx\n", ss, sp);
417 405
418 return 0; 406 show_registers(regs);
407 /* Executive summary in case the oops scrolled away */
408 sp = (unsigned long) (&regs->sp);
409 savesegment(ss, ss);
410 if (user_mode(regs)) {
411 sp = regs->sp;
412 ss = regs->ss & 0xffff;
419 } 413 }
420 414 printk(KERN_EMERG "EIP: [<%08lx>] ", regs->ip);
421 return 1; 415 print_symbol("%s", regs->ip);
416 printk(" SS:ESP %04x:%08lx\n", ss, sp);
417 return 0;
422} 418}
423 419
424/* 420/*
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index 03d63b0f5b4b..019a06fcfbdc 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -557,9 +557,9 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
557 do_exit(signr); 557 do_exit(signr);
558} 558}
559 559
560int __kprobes __die(const char * str, struct pt_regs * regs, long err) 560int __kprobes __die(const char *str, struct pt_regs *regs, long err)
561{ 561{
562 printk(KERN_EMERG "%s: %04lx [%u] ", str, err & 0xffff,++die_counter); 562 printk(KERN_EMERG "%s: %04lx [%u] ", str, err & 0xffff, ++die_counter);
563#ifdef CONFIG_PREEMPT 563#ifdef CONFIG_PREEMPT
564 printk("PREEMPT "); 564 printk("PREEMPT ");
565#endif 565#endif