Author: mav
Date: Fri Feb 24 11:25:32 2017
New Revision: 314200
URL: https://svnweb.freebsd.org/changeset/base/314200

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

Modified:
  head/sys/cam/ctl/scsi_ctl.c

Modified: head/sys/cam/ctl/scsi_ctl.c
==============================================================================
--- head/sys/cam/ctl/scsi_ctl.c Fri Feb 24 11:07:49 2017        (r314199)
+++ head/sys/cam/ctl/scsi_ctl.c Fri Feb 24 11:25:32 2017        (r314200)
@@ -995,11 +995,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-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to