diff options
author | Alexander Motin <mav@FreeBSD.org> | 2019-05-06 19:08:03 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2019-05-06 19:08:03 +0000 |
commit | 8cb46437a770e6e48f7751b1e8e794c216bfc9c8 (patch) | |
tree | 1862d0d85c5e2ceb40943d02a71c718c805db397 /sys/cam | |
parent | 7c28c7e84ffec142ce8cb0dcf7fc10c4e67063fe (diff) | |
download | src-8cb46437a770e6e48f7751b1e8e794c216bfc9c8.tar.gz src-8cb46437a770e6e48f7751b1e8e794c216bfc9c8.zip |
Drop periph lock around cam_periph_unmapmem().
Since r345656 it may call copyout(), that may sleep.
MFC after: 3 days
Sponsored by: iXsystems, Inc.
Notes
Notes:
svn path=/head/; revision=347198
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_pass.c | 2 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_sg.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c index c2133814eaab..b91b0556f10b 100644 --- a/sys/cam/scsi/scsi_pass.c +++ b/sys/cam/scsi/scsi_pass.c @@ -2261,7 +2261,9 @@ passsendccb(struct cam_periph *periph, union ccb *ccb, union ccb *inccb) /* sense_flags */ SF_RETRY_UA | SF_NO_PRINT, softc->device_stats); + cam_periph_unlock(periph); cam_periph_unmapmem(ccb, &mapinfo); + cam_periph_lock(periph); ccb->ccb_h.cbfcnp = NULL; ccb->ccb_h.periph_priv = inccb->ccb_h.periph_priv; diff --git a/sys/cam/scsi/scsi_sg.c b/sys/cam/scsi/scsi_sg.c index caa6c7c34314..c4812f247cd9 100644 --- a/sys/cam/scsi/scsi_sg.c +++ b/sys/cam/scsi/scsi_sg.c @@ -915,7 +915,9 @@ sgsendccb(struct cam_periph *periph, union ccb *ccb) SF_RETRY_UA, softc->device_stats); + cam_periph_unlock(periph); cam_periph_unmapmem(ccb, &mapinfo); + cam_periph_lock(periph); return (error); } |