Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 2017 06:27:15 +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-11@freebsd.org
Subject:   svn commit: r314741 - stable/11/sys/cam/ctl
Message-ID:  <201703060627.v266RFdQ095381@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Mar  6 06:27:15 2017
New Revision: 314741
URL: https://svnweb.freebsd.org/changeset/base/314741

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

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

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



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