From owner-freebsd-mobile Wed Dec 8 0: 1:11 1999 Delivered-To: freebsd-mobile@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id B3C221502F; Wed, 8 Dec 1999 00:01:07 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id BAA45115; Wed, 8 Dec 1999 01:01:06 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id BAA02405; Wed, 8 Dec 1999 01:01:04 -0700 (MST) Message-Id: <199912080801.BAA02405@harmony.village.org> To: Atsushi Onoe Subject: Re: Newer pccard code Cc: mobile@FreeBSD.ORG, hackers@FreeBSD.ORG Reply-To: hackers@FreeBSD.ORG In-reply-to: Your message of "Wed, 08 Dec 1999 16:40:26 +0900." <199912080740.QAA00615@duplo.sm.sony.co.jp> References: <199912080740.QAA00615@duplo.sm.sony.co.jp> <199912080639.XAA01861@harmony.village.org> Date: Wed, 08 Dec 1999 01:01:04 -0700 From: Warner Losh Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org [[ 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-mobile" in the body of the message