X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=kernel%2Fpanic.c;h=be0b7636550d0f9d8ba2bf9567a365400d18705a;hb=e5db3e4087b0e74884be20c980b35999e67c27e5;hp=8ed89a175d79376600dfbfd777f06ed3c24665a5;hpb=9a8e5d41124a7352e554581333d4d9689dc1526b;p=cascardo%2Flinux.git diff --git a/kernel/panic.c b/kernel/panic.c index 8ed89a175d79..be0b7636550d 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -23,6 +23,7 @@ #include #include #include +#include #define PANIC_TIMER_STEP 100 #define PANIC_BLINK_SPD 18 @@ -74,6 +75,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 @@ -359,7 +368,7 @@ void oops_enter(void) /* * 64-bit random ID for oopses: */ -static u64 oops_id; +static u64 __suspend_volatile_bss oops_id; static int init_oops_id(void) {