From owner-freebsd-geom@FreeBSD.ORG Tue Aug 15 13:10:22 2006 Return-Path: X-Original-To: freebsd-geom@hub.freebsd.org Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1AF616A4DD for ; Tue, 15 Aug 2006 13:10:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CC2443D49 for ; Tue, 15 Aug 2006 13:10:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7FDAMB2019459 for ; Tue, 15 Aug 2006 13:10:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7FDAMQF019458; Tue, 15 Aug 2006 13:10:22 GMT (envelope-from gnats) Date: Tue, 15 Aug 2006 13:10:22 GMT Message-Id: <200608151310.k7FDAMQF019458@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org From: mglaum@sdf.lonestar.org Cc: Subject: Re: kern/98538: [geom] Kernel panic on ggate destroy X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mglaum@sdf.lonestar.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 13:10:22 -0000 The following reply was made to PR kern/98538; it has been noted by GNATS. From: mglaum@sdf.lonestar.org To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/98538: [geom] Kernel panic on ggate destroy Date: Tue, 15 Aug 2006 13:08:07 -0000 (UTC) A quick glance at /usr/src/sys/geom/gate/g_gate.c, I suspect the problem is that in the g_gate_ioctl() switch case G_GATE_CMD_DESTROY, there's a mtx_lock() but no subsequent mtx_unlock(). I've got a patch devised, below, but do not have the time or resources to try it. Would someone be willing to review this, try a patch and run a test? The Makefile is in /usr/src/sys/modules/geom/geom_gate. Again, I'm not sure about the positioning of the mtx_unlock(). Michael Glaum KVH Industries mglaum@kvh.com [patch for /usr/src/sys/geom/gate/g_gate.c] --- g_gate.c Tue Aug 1 16:00:34 2006 +++ g_gate.c.orig Tue Aug 1 16:00:02 2006 @@ -487,7 +487,6 @@ error = g_gate_destroy(sc, ggio->gctl_force); if (error == 0) g_gate_wither(sc); - mtx_unlock(&g_gate_list_mtx); g_topology_unlock(); g_gate_release(sc); return (error);