Drop periph lock around cam_periph_unmapmem().

Since r345656 it may call copyout(), that may sleep.

MFC after:	3 days
Sponsored by:	iXsystems, Inc.
This commit is contained in:
mav 2019-05-06 19:08:03 +00:00
parent 775c2bf391
commit c8679b8bb2
2 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -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);
}