Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 May 2019 04:16:06 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r347379 - stable/12/sys/cam/scsi
Message-ID:  <201905090416.x494G6H1015538@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu May  9 04:16:06 2019
New Revision: 347379
URL: https://svnweb.freebsd.org/changeset/base/347379

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

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

Modified: stable/12/sys/cam/scsi/scsi_pass.c
==============================================================================
--- stable/12/sys/cam/scsi/scsi_pass.c	Thu May  9 03:51:34 2019	(r347378)
+++ stable/12/sys/cam/scsi/scsi_pass.c	Thu May  9 04:16:06 2019	(r347379)
@@ -2261,7 +2261,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/12/sys/cam/scsi/scsi_sg.c
==============================================================================
--- stable/12/sys/cam/scsi/scsi_sg.c	Thu May  9 03:51:34 2019	(r347378)
+++ stable/12/sys/cam/scsi/scsi_sg.c	Thu May  9 04:16:06 2019	(r347379)
@@ -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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905090416.x494G6H1015538>