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)
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to