From owner-svn-src-stable@FreeBSD.ORG Fri Dec 11 12:53:09 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C61CB1065695; Fri, 11 Dec 2009 12:53:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B44558FC12; Fri, 11 Dec 2009 12:53:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBBCr9Qx009435; Fri, 11 Dec 2009 12:53:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBBCr9FE009432; Fri, 11 Dec 2009 12:53:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200912111253.nBBCr9FE009432@svn.freebsd.org> From: Alexander Motin Date: Fri, 11 Dec 2009 12:53:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200411 - in stable/8/sys/cam: . ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 12:53:09 -0000 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 */