From owner-freebsd-mobile Tue Dec 7 23:40:10 1999 Delivered-To: freebsd-mobile@freebsd.org Received: from onoe2.sm.sony.co.jp (onoe2.sm.sony.co.jp [133.138.10.2]) by hub.freebsd.org (Postfix) with ESMTP id E2EC315046 for ; Tue, 7 Dec 1999 23:40:01 -0800 (PST) (envelope-from onoe@sm.sony.co.jp) Received: from duplo.sm.sony.co.jp (onoe@localhost) by onoe2.sm.sony.co.jp (8.9.0/3.7W) with ESMTP id QAA06356 for ; Wed, 8 Dec 1999 16:40:01 +0900 (JST) Received: (from onoe@localhost) by duplo.sm.sony.co.jp (8.9.3/8.9.3) id QAA00615; Wed, 8 Dec 1999 16:40:26 +0900 (JST) Date: Wed, 8 Dec 1999 16:40:26 +0900 (JST) From: Atsushi Onoe Message-Id: <199912080740.QAA00615@duplo.sm.sony.co.jp> To: mobile@freebsd.org Subject: Re: Newer pccard code In-Reply-To: Your message of "Tue, 07 Dec 1999 23:39:53 -0700" <199912080639.XAA01861@harmony.village.org> References: <199912080639.XAA01861@harmony.village.org> X-Mailer: Cue version 0.6 (991117-1133/onoe) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I'm just looking into about this. > o Killing and restarting pccard brings the card back up, but > I get crashes in the network stack. I suspect that the > if_detach that I'm using is bogus somehow. I get this even > when I don't plug the card back in.... Must be dangling > reference somewhere. Probably the index to ifnet_addrs in if_detach() is wrong, though it won't be the reason of the problem. 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? Atsushi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message