Inhibit NMI watchdog when Alt-SysRq-T operation is underway
[profile/ivi/kernel-x86-ivi.git] / arch / x86_64 / kernel / traps.c
index cb29fb9..74cbeb2 100644 (file)
@@ -330,6 +330,7 @@ static int print_trace_stack(void *data, char *name)
 
 static void print_trace_address(void *data, unsigned long addr)
 {
+       touch_nmi_watchdog();
        printk_address(addr);
 }
 
@@ -465,13 +466,14 @@ static unsigned int die_nest_count;
 
 unsigned __kprobes long oops_begin(void)
 {
-       int cpu = smp_processor_id();
+       int cpu;
        unsigned long flags;
 
        oops_enter();
 
        /* racy, but better than risking deadlock. */
        local_irq_save(flags);
+       cpu = smp_processor_id();
        if (!spin_trylock(&die_lock)) { 
                if (cpu == die_owner) 
                        /* nested oops. should stop eventually */;
@@ -517,6 +519,7 @@ void __kprobes __die(const char * str, struct pt_regs * regs, long err)
        printk("\n");
        notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV);
        show_registers(regs);
+       add_taint(TAINT_DIE);
        /* Executive summary in case the oops scrolled away */
        printk(KERN_ALERT "RIP ");
        printk_address(regs->rip); 
@@ -530,7 +533,7 @@ void die(const char * str, struct pt_regs * regs, long err)
        unsigned long flags = oops_begin();
 
        if (!user_mode(regs))
-               report_bug(regs->rip);
+               report_bug(regs->rip, regs);
 
        __die(str, regs, err);
        oops_end(flags);