summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormdf <mdf@FreeBSD.org>2010-09-20 19:42:14 +0000
committermdf <mdf@FreeBSD.org>2010-09-20 19:42:14 +0000
commite9f1044ef225cc22f81c6fad1a68fb812e3328c8 (patch)
tree87862b89135f7fcd63426094c1a2790651aa7b88 /sys/cam
parent3e2d23f909272476403e9cfd83e4f5c8c0110d07 (diff)
downloadFreeBSD-src-e9f1044ef225cc22f81c6fad1a68fb812e3328c8.zip
FreeBSD-src-e9f1044ef225cc22f81c6fad1a68fb812e3328c8.tar.gz
Use destroy_dev_sched(9) instead of destroy_dev(9) in passcleanup() as
it is indirectly a d_close method. Prompted by: kib Reviewed by: mav MFC after: 2 weeks
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_pass.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c
index 9464ca2..dddfc7b 100644
--- a/sys/cam/scsi/scsi_pass.c
+++ b/sys/cam/scsi/scsi_pass.c
@@ -169,7 +169,11 @@ passcleanup(struct cam_periph *periph)
xpt_print(periph->path, "removing device entry\n");
devstat_remove_entry(softc->device_stats);
cam_periph_unlock(periph);
- destroy_dev(softc->dev);
+ /*
+ * passcleanup() is indirectly a d_close method via passclose,
+ * so using destroy_dev(9) directly can result in deadlock.
+ */
+ destroy_dev_sched(softc->dev);
cam_periph_lock(periph);
free(softc, M_DEVBUF);
}
OpenPOWER on IntegriCloud