Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Dec 1999 16:40:26 +0900 (JST)
From:      Atsushi Onoe <onoe@sm.sony.co.jp>
To:        mobile@freebsd.org
Subject:   Re: Newer pccard code
Message-ID:  <199912080740.QAA00615@duplo.sm.sony.co.jp>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912080740.QAA00615>