From owner-freebsd-current@FreeBSD.ORG Mon Mar 26 16:25:17 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B729E16A400 for ; Mon, 26 Mar 2007 16:25:17 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by mx1.freebsd.org (Postfix) with ESMTP id 8D0CA13C468 for ; Mon, 26 Mar 2007 16:25:17 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id BFB2B20C33F; Mon, 26 Mar 2007 12:25:17 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 26 Mar 2007 12:25:17 -0400 X-Sasl-enc: WQqmy/I/H3VMy1ZPbo59dm/9T32ARQhrYuE+tjfMxtdD 1174926317 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id 44B4F1135E; Mon, 26 Mar 2007 12:25:17 -0400 (EDT) Message-ID: <4607F3EA.30902@FreeBSD.org> Date: Mon, 26 Mar 2007 17:25:14 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.9 (X11/20070125) MIME-Version: 1.0 To: Tom Uffner References: <4607893B.3080409@uffner.com> In-Reply-To: <4607893B.3080409@uffner.com> Content-Type: multipart/mixed; boundary="------------060906000603030708070900" Cc: freebsd-current@freebsd.org Subject: Re: current panics when Netgear WG511T ejected X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2007 16:25:17 -0000 This is a multi-part message in MIME format. --------------060906000603030708070900 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Please try this patch. Regards, BMS --------------060906000603030708070900 Content-Type: text/x-patch; name="if.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="if.c.diff" ==== //depot/user/bms/netdev/sys/net/if.c#10 - /home/bms/p4/netdev/sys/net/if.c ==== --- /tmp/tmp.1084.0 Mon Mar 26 17:18:47 2007 +++ /home/bms/p4/netdev/sys/net/if.c Mon Mar 26 17:18:33 2007 @@ -2513,19 +2513,19 @@ * If the ifnet is detaching, null out references to ifnet, * so that upper protocol layers will notice, and not attempt * to obtain locks for an ifnet which no longer exists. - * It is OK to call rt_newmaddrmsg() with a NULL ifp. + * XXX: rt_newaddrmsg() needs to be called before the ifnet instance + * is detached from the system interface list. */ if (detaching) { #ifdef DIAGNOSTIC printf("%s: detaching ifnet instance %p\n", __func__, ifp); #endif + rt_newmaddrmsg(RTM_DELMADDR, ifma); ifma->ifma_ifp = NULL; } if (--ifma->ifma_refcount > 0) return 0; - - rt_newmaddrmsg(RTM_DELMADDR, ifma); /* * If this ifma is a network-layer ifma, a link-layer ifma may --------------060906000603030708070900--