mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
ctl_ha: don't shutdown threads if scheduler is stopped
In this case, just return. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42341 (cherry picked from commit 9d61fd08499609a2c95d1c66f97587932b446f06)
This commit is contained in:
parent
951d60ee3a
commit
9732eb8eae
1 changed files with 4 additions and 1 deletions
|
|
@ -910,13 +910,16 @@ ctl_ha_msg_shutdown(struct ctl_softc *ctl_softc)
|
|||
{
|
||||
struct ha_softc *softc = &ha_softc;
|
||||
|
||||
if (SCHEDULER_STOPPED())
|
||||
return;
|
||||
|
||||
/* Disconnect and shutdown threads. */
|
||||
mtx_lock(&softc->ha_lock);
|
||||
if (softc->ha_shutdown < 2) {
|
||||
softc->ha_shutdown = 1;
|
||||
softc->ha_wakeup = 1;
|
||||
wakeup(&softc->ha_wakeup);
|
||||
while (softc->ha_shutdown < 2 && !SCHEDULER_STOPPED()) {
|
||||
while (softc->ha_shutdown < 2) {
|
||||
msleep(&softc->ha_wakeup, &softc->ha_lock, 0,
|
||||
"shutdown", hz);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue