VIMAGE crashes on 9.x with hotplug net80211 devices

Adrian Chadd adrian at freebsd.org
Tue Oct 23 17:37:03 UTC 2012


On 23 October 2012 00:16, Marko Zec <zec at fer.hr> wrote:

> As already mentioned earlier, I don't terribly object if you'd place
> CURVNET_SET(ifp->if_vnet) inside if_free() and a limited number of similar
> functions, but I don't quite believe this is will enough to solve the
> device_detach() issue without having to touch any of the drivers...

That's why I'm asking for more/better ideas.

So far my ideas are:

* for hotplug insert - do the same as what you're doing during the
kldload and boot device enumeration pass - call CURVNET_SET(vnet0)
* for device unload (hotplug or otherwise) - if vnet isn't set,
implicitly set it to vnet0
* for the net80211 vaps, they get destroyed in a few places (ioctl
path, device detach path, I'm sure I saw one more) so I have to use
CURVNET_SET(ifp->if_vnet) on those.

Now, that _should_ fix it for ath(4) and net80211, and it should fix
it for all the other non-USB wireless devices out there.

Now as for USB - Hans, what do you think? Should we do something
similar? How does VIMAGE work right now with USB wireless and USB
ethernet devices?

Marko - thanks for persisting with this. I'd like to try and make this
work for 10.0.



Adrian


More information about the freebsd-hackers mailing list