In message <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message