Date: Wed, 08 Dec 1999 01:01:04 -0700 From: Warner Losh <imp@village.org> To: Atsushi Onoe <onoe@sm.sony.co.jp> Cc: mobile@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: Newer pccard code Message-ID: <199912080801.BAA02405@harmony.village.org> In-Reply-To: Your message of "Wed, 08 Dec 1999 16:40:26 %2B0900." <199912080740.QAA00615@duplo.sm.sony.co.jp> References: <199912080740.QAA00615@duplo.sm.sony.co.jp> <199912080639.XAA01861@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[[ I had observed that if_detach seemed to cause problems in the pccard code after the device had gone away. Redirected to -hackers since I think is where hairy network stuff is dealt with. --imp ]] In message <199912080740.QAA00615@duplo.sm.sony.co.jp> Atsushi Onoe writes: : There are some inconsistency of two TAILQs: : ifp->if_addrhead struct ifaddr : in_ifaddrhead struct in_ifaddr : : Both these two list are managed in in_control (netinet/in.c). : In case of removing pccard, if_detach() only cares about ifp->if_addrhead, : and the corresponding in_ifaddr entry in in_ifaddrhead is not removed. : Since free'd ifaddr is still referenced by in_ifaddr, : it will be the reason of possible crash or lock up by looped list. : : I'm not sure how to fix this, but if_detach() should not remove : ifaddr from ifp->if_addrhead, and should ask protocol specific layer : to delete all addresses through if_ioctl(). SIOCFIFADDR? I'll leave this one to those more skilled at the network layer than I am. I don't know the network layer that well right now. I did observe that I didn't get any more crashes after disabling my use of DHCP to get an address. Likely that was the dangling reference that cause me grief. dhcp uses bpf, which is likely the reference in question. W/o dhcp, I was able to insert/remove the card 4 times w/o a problem, where before doing it twice would alway give a crash. The machine was stable enough to then make the commits to -current from, which never has been the case before. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912080801.BAA02405>