diff options
author | mav <mav@FreeBSD.org> | 2017-01-21 08:43:11 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2017-01-21 08:43:11 +0000 |
commit | 3ee9964e3eafdf91dee09cdef787d98c3cb2e2a0 (patch) | |
tree | addce38d4a5cb4a305b91e1e7c4e468b85fbed00 | |
parent | 55bcadcddb6c6e0248285305aa8247858d3d22f1 (diff) | |
download | FreeBSD-src-3ee9964e3eafdf91dee09cdef787d98c3cb2e2a0.zip FreeBSD-src-3ee9964e3eafdf91dee09cdef787d98c3cb2e2a0.tar.gz |
MFC r311892: Do not wait for HA thread shutdown if scheduler is stopped.
This wait loop made system hang on panic instead of reboot.
-rw-r--r-- | sys/cam/ctl/ctl_ha.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/cam/ctl/ctl_ha.c b/sys/cam/ctl/ctl_ha.c index d7f21c7..3402f04 100644 --- a/sys/cam/ctl/ctl_ha.c +++ b/sys/cam/ctl/ctl_ha.c @@ -1001,7 +1001,7 @@ ctl_ha_msg_shutdown(struct ctl_softc *ctl_softc) softc->ha_shutdown = 1; softc->ha_wakeup = 1; wakeup(&softc->ha_wakeup); - while (softc->ha_shutdown < 2) { + while (softc->ha_shutdown < 2 && !SCHEDULER_STOPPED()) { msleep(&softc->ha_wakeup, &softc->ha_lock, 0, "shutdown", hz); } |