Author: imp Date: Mon Nov 11 17:36:47 2019 New Revision: 354621 URL: https://svnweb.freebsd.org/changeset/base/354621
Log: Require and enforce that dareprobe() has to be called with the periph lock held. Reviewed by: scottl, ken Differential Revision: https://reviews.freebsd.org/D22295 Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Mon Nov 11 17:36:42 2019 (r354620) +++ head/sys/cam/scsi/scsi_da.c Mon Nov 11 17:36:47 2019 (r354621) @@ -2133,8 +2133,8 @@ daasync(void *callback_arg, u_int32_t code, "Capacity data has changed\n"); cam_periph_lock(periph); softc->flags &= ~DA_FLAG_PROBED; - cam_periph_unlock(periph); dareprobe(periph); + cam_periph_unlock(periph); } else if (asc == 0x28 && ascq == 0x00) { cam_periph_lock(periph); softc->flags &= ~DA_FLAG_PROBED; @@ -2145,8 +2145,8 @@ daasync(void *callback_arg, u_int32_t code, "INQUIRY data has changed\n"); cam_periph_lock(periph); softc->flags &= ~DA_FLAG_PROBED; - cam_periph_unlock(periph); dareprobe(periph); + cam_periph_unlock(periph); } } break; @@ -5826,6 +5826,8 @@ dareprobe(struct cam_periph *periph) int status; softc = (struct da_softc *)periph->softc; + + cam_periph_assert(periph, MA_OWNED); /* Probe in progress; don't interfere. */ if (softc->state != DA_STATE_NORMAL) _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
