diff --git a/kernel/panic.c b/kernel/panic.c
index 47e8ebccc22be40478e2581616456f5749b7c4a9..f470a038b05bd1111bc3e0dd2195d6b15e823d14 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -180,6 +180,7 @@ void panic(const char *fmt, ...)
 	 * after setting panic_cpu) from invoking panic() again.
 	 */
 	local_irq_disable();
+	preempt_disable_notrace();
 
 	/*
 	 * It's possible to come here directly from a panic-assertion and