diff options
Diffstat (limited to 'kernel/panic.c')
| -rw-r--r-- | kernel/panic.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index d2a5f4ecc6dd..e1b2822fff97 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
| @@ -75,6 +75,14 @@ void panic(const char *fmt, ...) | |||
| 75 | int state = 0; | 75 | int state = 0; |
| 76 | 76 | ||
| 77 | /* | 77 | /* |
| 78 | * Disable local interrupts. This will prevent panic_smp_self_stop | ||
| 79 | * from deadlocking the first cpu that invokes the panic, since | ||
| 80 | * there is nothing to prevent an interrupt handler (that runs | ||
| 81 | * after the panic_lock is acquired) from invoking panic again. | ||
| 82 | */ | ||
| 83 | local_irq_disable(); | ||
| 84 | |||
| 85 | /* | ||
| 78 | * It's possible to come here directly from a panic-assertion and | 86 | * It's possible to come here directly from a panic-assertion and |
| 79 | * not have preempt disabled. Some functions called from here want | 87 | * not have preempt disabled. Some functions called from here want |
| 80 | * preempt to be disabled. No point enabling it later though... | 88 | * preempt to be disabled. No point enabling it later though... |
