svn commit: r314740 - stable/10/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Mon Mar 6 06:26:44 UTC 2017


Author: mav
Date: Mon Mar  6 06:26:43 2017
New Revision: 314740
URL: https://svnweb.freebsd.org/changeset/base/314740

Log:
  MFC r314200: We can't access periph after ctlfe_free_ccb().

Modified:
  stable/10/sys/cam/ctl/scsi_ctl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/scsi_ctl.c
==============================================================================
--- stable/10/sys/cam/ctl/scsi_ctl.c	Mon Mar  6 06:26:02 2017	(r314739)
+++ stable/10/sys/cam/ctl/scsi_ctl.c	Mon Mar  6 06:26:43 2017	(r314740)
@@ -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)


More information about the svn-src-stable-10 mailing list