diff options
Diffstat (limited to 'arch/i386/kernel/traps.c')
-rw-r--r-- | arch/i386/kernel/traps.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 57772a18c39..cfffe3dd9e8 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -618,6 +618,13 @@ fastcall void __kprobes do_general_protection(struct pt_regs * regs, | |||
618 | 618 | ||
619 | current->thread.error_code = error_code; | 619 | current->thread.error_code = error_code; |
620 | current->thread.trap_no = 13; | 620 | current->thread.trap_no = 13; |
621 | if (show_unhandled_signals && unhandled_signal(current, SIGSEGV) && | ||
622 | printk_ratelimit()) | ||
623 | printk(KERN_INFO | ||
624 | "%s[%d] general protection eip:%lx esp:%lx error:%lx\n", | ||
625 | current->comm, current->pid, | ||
626 | regs->eip, regs->esp, error_code); | ||
627 | |||
621 | force_sig(SIGSEGV, current); | 628 | force_sig(SIGSEGV, current); |
622 | return; | 629 | return; |
623 | 630 | ||
@@ -768,6 +775,8 @@ static __kprobes void default_do_nmi(struct pt_regs * regs) | |||
768 | reassert_nmi(); | 775 | reassert_nmi(); |
769 | } | 776 | } |
770 | 777 | ||
778 | static int ignore_nmis; | ||
779 | |||
771 | fastcall __kprobes void do_nmi(struct pt_regs * regs, long error_code) | 780 | fastcall __kprobes void do_nmi(struct pt_regs * regs, long error_code) |
772 | { | 781 | { |
773 | int cpu; | 782 | int cpu; |
@@ -778,11 +787,24 @@ fastcall __kprobes void do_nmi(struct pt_regs * regs, long error_code) | |||
778 | 787 | ||
779 | ++nmi_count(cpu); | 788 | ++nmi_count(cpu); |
780 | 789 | ||
781 | default_do_nmi(regs); | 790 | if (!ignore_nmis) |
791 | default_do_nmi(regs); | ||
782 | 792 | ||
783 | nmi_exit(); | 793 | nmi_exit(); |
784 | } | 794 | } |
785 | 795 | ||
796 | void stop_nmi(void) | ||
797 | { | ||
798 | acpi_nmi_disable(); | ||
799 | ignore_nmis++; | ||
800 | } | ||
801 | |||
802 | void restart_nmi(void) | ||
803 | { | ||
804 | ignore_nmis--; | ||
805 | acpi_nmi_enable(); | ||
806 | } | ||
807 | |||
786 | #ifdef CONFIG_KPROBES | 808 | #ifdef CONFIG_KPROBES |
787 | fastcall void __kprobes do_int3(struct pt_regs *regs, long error_code) | 809 | fastcall void __kprobes do_int3(struct pt_regs *regs, long error_code) |
788 | { | 810 | { |