Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[profile/ivi/kernel-adaptation-intel-automotive.git] / kernel / panic.c
index d2a5f4e..e1b2822 100644 (file)
@@ -75,6 +75,14 @@ void panic(const char *fmt, ...)
        int state = 0;
 
        /*
+        * Disable local interrupts. This will prevent panic_smp_self_stop
+        * from deadlocking the first cpu that invokes the panic, since
+        * there is nothing to prevent an interrupt handler (that runs
+        * after the panic_lock is acquired) from invoking panic again.
+        */
+       local_irq_disable();
+
+       /*
         * It's possible to come here directly from a panic-assertion and
         * not have preempt disabled. Some functions called from here want
         * preempt to be disabled. No point enabling it later though...