diff options
author | mav <mav@FreeBSD.org> | 2017-03-06 06:27:15 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2017-03-06 06:27:15 +0000 |
commit | 87ca4ed3da549b93910348d91092bccddce1d98f (patch) | |
tree | 17bd0c8e416cc69434afca53a56074b5d01db828 /sys/cam | |
parent | a344c48fc93b31a20dd7ed7b978a23cbf8eb6cd2 (diff) | |
download | FreeBSD-src-87ca4ed3da549b93910348d91092bccddce1d98f.zip FreeBSD-src-87ca4ed3da549b93910348d91092bccddce1d98f.tar.gz |
MFC r314200: We can't access periph after ctlfe_free_ccb().
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/ctl/scsi_ctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c index a97c874..2078be3 100644 --- a/sys/cam/ctl/scsi_ctl.c +++ b/sys/cam/ctl/scsi_ctl.c @@ -1001,11 +1001,13 @@ static void ctlfe_requeue_ccb(struct cam_periph *periph, union ccb *ccb, int unlock) { struct ctlfe_lun_softc *softc; + struct mtx *mtx; if (periph->flags & CAM_PERIPH_INVALID) { + mtx = cam_periph_mtx(periph); ctlfe_free_ccb(periph, ccb); if (unlock) - cam_periph_unlock(periph); + mtx_unlock(mtx); return; } if (unlock) |