Date: Tue, 05 Sep 2000 12:43:35 -0600 From: Warner Losh <imp@village.org> To: Robert Watson <rwatson@FreeBSD.ORG> Cc: Wes Peters <wes@softweyr.com>, Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp>, current@FreeBSD.ORG, net@FreeBSD.ORG Subject: Re: the ifp to a removed pcmcia ethernet card is left in struct ip_moptions and struct ifmultiaddr Message-ID: <200009051843.MAA62492@harmony.village.org> In-Reply-To: Your message of "Tue, 05 Sep 2000 14:38:54 EDT." <Pine.NEB.3.96L.1000905143626.2846B-100000@fledge.watson.org> References: <Pine.NEB.3.96L.1000905143626.2846B-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.NEB.3.96L.1000905143626.2846B-100000@fledge.watson.org> Robert Watson writes: : This is all made harder by the fact that struct mbuf has a struct ifnet : pointer in it, so if for any reason there is an outstanding mbuf : originating from that interface, it is possible that the struct ifnet * : will be dereferenced. For example, if it hits an ipfw rule that dummynets : it, then hits an interface-based rule. Yes. That's true. There's a race. : This has been raised as an issue before, and is a good reason to ifconfig : down the interface, and wait a second or two before ejecting. You could : imagine code-based solutions, including scanning mbufs (?) for pointers : that are undesirable, refcounting the struct ifnet so it isn't freed until : all mbufs are free'd, etc. Whatever the case, you want to make sure that : locking in the line of fire is avoided (i.e., attempting to lock struct : ifnet during packet handling in the interrupt). No body waits :-(. This is made worse by pccard's detaching the device when a suspend happens via acpi or apm. NetBSD has done some interesting things in this area with reference counting and such that I'd love to bring in as soon as I get newcard done. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009051843.MAA62492>