diff options
author | mjacob <mjacob@FreeBSD.org> | 1999-10-16 23:31:34 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 1999-10-16 23:31:34 +0000 |
commit | 25ab9f2150fa1e7e374781b5a5da9d5058a6efcf (patch) | |
tree | 25c7042abb3441cd1bf7ea2b0ddf71d71867f920 /sys | |
parent | b5bf6b94db50b34875b15a2b1bcc505a69c22c9f (diff) | |
download | FreeBSD-src-25ab9f2150fa1e7e374781b5a5da9d5058a6efcf.zip FreeBSD-src-25ab9f2150fa1e7e374781b5a5da9d5058a6efcf.tar.gz |
Protect xpt_run_dev_sendq in xpt_release_devq_device with splsoftcam. This
seems to handle the case of timeouts firing during probe but after a device
has gone away. It really does help.
Obtained from:gibbs@freebsd.org
Diffstat (limited to 'sys')
-rw-r--r-- | sys/cam/cam_xpt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 03ba677..466af40 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -4350,10 +4350,11 @@ static void xpt_release_devq_device(struct cam_ed *dev, u_int count, int run_queue) { int rundevq; - int s; + int s0, s1; rundevq = 0; - s = splcam(); + s0 = splsoftcam(); + s1 = splcam(); if (dev->qfrozen_cnt > 0) { count = (count > dev->qfrozen_cnt) ? dev->qfrozen_cnt : count; @@ -4388,9 +4389,10 @@ xpt_release_devq_device(struct cam_ed *dev, u_int count, int run_queue) } } } - splx(s); + splx(s1); if (rundevq != 0) xpt_run_dev_sendq(dev->target->bus); + splx(s0); } void |