From owner-svn-src-head@FreeBSD.ORG Wed Jul 1 20:16:29 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF26110657F9; Wed, 1 Jul 2009 20:16:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD76A8FC19; Wed, 1 Jul 2009 20:16:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n61KGT3W022831; Wed, 1 Jul 2009 20:16:29 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n61KGTSe022828; Wed, 1 Jul 2009 20:16:29 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200907012016.n61KGTSe022828@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 1 Jul 2009 20:16:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195257 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2009 20:16:30 -0000 Author: trasz Date: Wed Jul 1 20:16:29 2009 New Revision: 195257 URL: http://svn.freebsd.org/changeset/base/195257 Log: Fix a panic which (reportedly) can happen when unmounting a filesystem with I/O requests in flight on kernels compiled with "options INVARIANTS". Also, make it obvious it's not right to call g_valid_obj() (and macros using it, e.g. G_VALID_CONSUMER()) without topology lock held. Approved by: re (kib) Reported by: pho Modified: head/sys/geom/geom_subr.c head/sys/geom/geom_vfs.c Modified: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Wed Jul 1 20:07:44 2009 (r195256) +++ head/sys/geom/geom_subr.c Wed Jul 1 20:16:29 2009 (r195257) @@ -1025,6 +1025,8 @@ g_valid_obj(void const *ptr) struct g_consumer *cp; struct g_provider *pp; + g_topology_assert(); + LIST_FOREACH(mp, &g_classes, class) { if (ptr == mp) return (1); Modified: head/sys/geom/geom_vfs.c ============================================================================== --- head/sys/geom/geom_vfs.c Wed Jul 1 20:07:44 2009 (r195256) +++ head/sys/geom/geom_vfs.c Wed Jul 1 20:16:29 2009 (r195257) @@ -106,7 +106,7 @@ g_vfs_strategy(struct bufobj *bo, struct int vfslocked; cp = bo->bo_private; - G_VALID_CONSUMER(cp); + /* G_VALID_CONSUMER(cp); We likely lack topology lock */ /* * If the the provider has orphaned us, just return EXIO.