diff options
author | mdf <mdf@FreeBSD.org> | 2010-09-20 19:42:14 +0000 |
---|---|---|
committer | mdf <mdf@FreeBSD.org> | 2010-09-20 19:42:14 +0000 |
commit | e9f1044ef225cc22f81c6fad1a68fb812e3328c8 (patch) | |
tree | 87862b89135f7fcd63426094c1a2790651aa7b88 /sys/cam | |
parent | 3e2d23f909272476403e9cfd83e4f5c8c0110d07 (diff) | |
download | FreeBSD-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.c | 6 |
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); } |