Date: Mon, 26 Mar 2007 17:25:14 +0100 From: "Bruce M. Simpson" <bms@FreeBSD.org> To: Tom Uffner <tom@uffner.com> Cc: freebsd-current@freebsd.org Subject: Re: current panics when Netgear WG511T ejected Message-ID: <4607F3EA.30902@FreeBSD.org> In-Reply-To: <4607893B.3080409@uffner.com> References: <4607893B.3080409@uffner.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4607F3EA.30902>