mirror of
https://github.com/opnsense/src.git
synced 2026-04-23 07:07:24 -04:00
If the panic thread is preempted after setting panicstr but before
setting TDF_INPANIC then it will never be rescheduled again. Wrap setting the panic condition with the critical section. Noted and reviewed by: tegge MFC after: 1 week
This commit is contained in:
parent
b798355b99
commit
41a4e90e6f
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue