]> Pileus Git - ~andy/linux/blobdiff - kernel/panic.c
drm/i915: Assert that the exec object lookup table is a power-of-two
[~andy/linux] / kernel / panic.c
index d2a5f4ecc6ddd2ebc2da68764da646c7b96d9fc9..e1b2822fff97b8164ffae96e8a17ace02060a0c1 100644 (file)
@@ -74,6 +74,14 @@ void panic(const char *fmt, ...)
        long i, i_next = 0;
        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