Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 2009 12:53:09 +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-8@freebsd.org
Subject:   svn commit: r200411 - in stable/8/sys/cam: . ata
Message-ID:  <200912111253.nBBCr9FE009432@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Fri Dec 11 12:53:09 2009
New Revision: 200411
URL: http://svn.freebsd.org/changeset/base/200411

Log:
  MFC r200180:
  If we panicked with SIM lock held, do not try to flush caches.
  Extra lock recursing will not make debugging easier.

Modified:
  stable/8/sys/cam/ata/ata_da.c
  stable/8/sys/cam/cam_periph.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cam/ata/ata_da.c
==============================================================================
--- stable/8/sys/cam/ata/ata_da.c	Fri Dec 11 12:46:41 2009	(r200410)
+++ stable/8/sys/cam/ata/ata_da.c	Fri Dec 11 12:53:09 2009	(r200411)
@@ -1040,6 +1040,9 @@ adashutdown(void * arg, int howto)
 	TAILQ_FOREACH(periph, &adadriver.units, unit_links) {
 		union ccb ccb;
 
+		/* If we paniced with lock held - not recurse here. */
+		if (cam_periph_owned(periph))
+			continue;
 		cam_periph_lock(periph);
 		softc = (struct ada_softc *)periph->softc;
 		/*

Modified: stable/8/sys/cam/cam_periph.h
==============================================================================
--- stable/8/sys/cam/cam_periph.h	Fri Dec 11 12:46:41 2009	(r200410)
+++ stable/8/sys/cam/cam_periph.h	Fri Dec 11 12:53:09 2009	(r200411)
@@ -190,5 +190,11 @@ cam_periph_unlock(struct cam_periph *per
 	mtx_unlock(periph->sim->mtx);
 }
 
+static __inline int
+cam_periph_owned(struct cam_periph *periph)
+{
+	return (mtx_owned(periph->sim->mtx));
+}
+
 #endif /* _KERNEL */
 #endif /* _CAM_CAM_PERIPH_H */



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