Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Oct 2012 12:50:21 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Marko Zec <zec@fer.hr>
Cc:        freebsd-net@freebsd.org, freebsd-hackers@freebsd.org
Subject:   Re: VIMAGE crashes on 9.x with hotplug net80211 devices
Message-ID:  <CAJ-Vmom1-zYuArGTG5hkft2aBtFDSfBSn1r90qDpu7nejyXwRw@mail.gmail.com>
In-Reply-To: <201210212136.12788.zec@fer.hr>
References:  <CAJ-VmomchJZ7GUKrAjmmyBXDw-6H6O5fAxT_tfAFfhU=HknG1g@mail.gmail.com> <201210212136.12788.zec@fer.hr>

next in thread | previous in thread | raw e-mail | index | archive | help
On 21 October 2012 12:36, Marko Zec <zec@fer.hr> wrote:

> The right approach would be to do a single CURVNET_SET(vnet0) /
> CURVNET_RESTORE() somewhere near the root of the call graph being triggered
> by the hotplug attach event.  Not having any hotpluggable hardware at hand
> I cannot be more specific where that place could be...

Right; would that be at the net80211 side, or something higher up (eg
at device_attach, which gets called from the cardbus/pci bridge
enumeration code.)

> But most certainly doing CURVNET_SET(vnet0) on detach events would be wrong:
> since ifnets may be assignet to non-default vnets,
> CURVNET_SET(ifp->if_vnet) should be more appropriate there.

Thanks for that. I'll look at adding that in my next debug pass.

> Another thing that may help could be turning on options VNET_DEBUG when, as
> that should reveal excessive (and probably redundant) CURVNET_SET()
> recursions.

I've spotted a couple, however the crashing here is the important bit. :-)

So - why is it that the V_* variables are NULL pointers at this stage?
I thought the kernel would've been running with a default vnet context
of vnet0? Why doesn't this impact other network device hotplugging? Or
does it, and noone noticed?



Adrian



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