From: Alexander Nyberg The two functions: crash_kexec() smp_send_stop() called from panic() wants preempt to be disabled which it may not be if coming from a direct panic assertion (and not via the do_exit assertions...). Signed-off-by: Alexander Nyberg Signed-off-by: Andrew Morton --- kernel/panic.c | 7 +++++++ 1 files changed, 7 insertions(+) diff -puN kernel/panic.c~kexec-disable-preempt-in-panic kernel/panic.c --- 25/kernel/panic.c~kexec-disable-preempt-in-panic 2005-04-27 03:54:01.403970376 -0700 +++ 25-akpm/kernel/panic.c 2005-04-27 03:54:01.406969920 -0700 @@ -64,6 +64,13 @@ NORET_TYPE void panic(const char * fmt, unsigned long caller = (unsigned long) __builtin_return_address(0); #endif + /* + * 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... + */ + preempt_disable(); + bust_spinlocks(1); va_start(args, fmt); vsnprintf(buf, sizeof(buf), fmt, args); _