diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 6c3d82dc57ec..e6d4f4466f2a 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -511,6 +511,7 @@ panic(const char *fmt, ...) va_list ap; static char buf[256]; + critical_enter(); #ifdef SMP /* * We don't want multiple CPU's to panic at the same time, so we @@ -569,6 +570,7 @@ panic(const char *fmt, ...) /* thread_unlock(td); */ if (!sync_on_panic) bootopt |= RB_NOSYNC; + critical_exit(); boot(bootopt); }