diff options
author | Alexander Motin <mav@FreeBSD.org> | 2017-01-10 20:16:16 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2017-01-10 20:16:16 +0000 |
commit | 4982dca18d2dde64fbc0483208b961af1d4ef030 (patch) | |
tree | 9fb3c285ff916e3450f6ea24bf708190c60f4f77 | |
parent | 759e131362059b638c5640c6f17a572006287bf1 (diff) | |
download | src-4982dca18d2dde64fbc0483208b961af1d4ef030.tar.gz src-4982dca18d2dde64fbc0483208b961af1d4ef030.zip |
Do not wait for HA thread shutdown if scheduler is stopped.
This wait loop made system hang on panic instead of reboot.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=311892
-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 d7f21c7a74b6..3402f040ee02 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); } |