Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Aug 2020 08:52:00 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r364905 - stable/12/sys/cam/scsi
Message-ID:  <202008280852.07S8q0mh070989@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri Aug 28 08:52:00 2020
New Revision: 364905
URL: https://svnweb.freebsd.org/changeset/base/364905

Log:
  MFC r354668 by imp: Fix a race between daopen and damediapoll

Modified:
  stable/12/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/12/sys/cam/scsi/scsi_da.c	Fri Aug 28 08:50:07 2020	(r364904)
+++ stable/12/sys/cam/scsi/scsi_da.c	Fri Aug 28 08:52:00 2020	(r364905)
@@ -5929,6 +5929,7 @@ damediapoll(void *arg)
 
 	if (!cam_iosched_has_work_flags(softc->cam_iosched, DA_WORK_TUR) &&
 	    (softc->flags & DA_FLAG_TUR_PENDING) == 0 &&
+	    softc->state == DA_STATE_NORMAL &&
 	    LIST_EMPTY(&softc->pending_ccbs)) {
 		if (da_periph_acquire(periph, DA_REF_TUR) == 0) {
 			cam_iosched_set_work_flags(softc->cam_iosched, DA_WORK_TUR);



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