svn commit: r347380 - stable/11/sys/cam/scsi

Alexander Motin mav at FreeBSD.org
Thu May 9 04:16:32 UTC 2019


Author: mav
Date: Thu May  9 04:16:31 2019
New Revision: 347380
URL: https://svnweb.freebsd.org/changeset/base/347380

Log:
  MFC r347198: Drop periph lock around cam_periph_unmapmem().
  
  Since r345656 it may call copyout(), that may sleep.

Modified:
  stable/11/sys/cam/scsi/scsi_pass.c
  stable/11/sys/cam/scsi/scsi_sg.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/scsi/scsi_pass.c
==============================================================================
--- stable/11/sys/cam/scsi/scsi_pass.c	Thu May  9 04:16:06 2019	(r347379)
+++ stable/11/sys/cam/scsi/scsi_pass.c	Thu May  9 04:16:31 2019	(r347380)
@@ -2262,7 +2262,9 @@ passsendccb(struct cam_periph *periph, union ccb *ccb,
 	    /* 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;

Modified: stable/11/sys/cam/scsi/scsi_sg.c
==============================================================================
--- stable/11/sys/cam/scsi/scsi_sg.c	Thu May  9 04:16:06 2019	(r347379)
+++ stable/11/sys/cam/scsi/scsi_sg.c	Thu May  9 04:16:31 2019	(r347380)
@@ -916,7 +916,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);
 }


More information about the svn-src-all mailing list