diff options
author | Mark Johnston <markj@FreeBSD.org> | 2021-09-25 14:13:56 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2021-10-02 15:28:07 +0000 |
commit | 0d5184c5fb4c9110e70eaf230673af34ad262458 (patch) | |
tree | 82841bd86de019bd9190a6d278a7e83e805ef530 /sys/cam | |
parent | cea130c0b8f5a32b0e4a22befb89bad73f8663c2 (diff) | |
download | src-0d5184c5fb4c9110e70eaf230673af34ad262458.tar.gz src-0d5184c5fb4c9110e70eaf230673af34ad262458.zip |
cam: Avoiding waking up doneq threads if we're dumping
Depending on the state of the target doneq thread at the time of the
panic, the wakeup can hang indefinitely in thread_lock_block_wait().
That function should likely be modified to return immediately if the
scheduler is stopped, but it is also preferable to avoid wakeups in
general after a panic.
Reported by: pho
Reviewed by: mav, imp
Sponsored by: The FreeBSD Foundation
(cherry picked from commit ed8ef7ae8b05d9f73db2182b5e24b0b76b0783a2)
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_xpt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index e3b43e70dc61..0e38166b6ba0 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -4635,7 +4635,7 @@ xpt_done(union ccb *done_ccb) STAILQ_INSERT_TAIL(&queue->cam_doneq, &done_ccb->ccb_h, sim_links.stqe); done_ccb->ccb_h.pinfo.index = CAM_DONEQ_INDEX; mtx_unlock(&queue->cam_doneq_mtx); - if (run) + if (run && !dumping) wakeup(&queue->cam_doneq); } |