Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Oct 2012 10:29:33 -0700
From:      Julian Elischer <julian@freebsd.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        freebsd-net@freebsd.org, Marko Zec <zec@fer.hr>, freebsd-hackers@freebsd.org
Subject:   Re: VIMAGE crashes on 9.x with hotplug net80211 devices
Message-ID:  <5085827D.5090108@freebsd.org>
In-Reply-To: <CAJ-VmokU2yY39y0BO8QroJWK8YUUZG=WtakxjMpd%2B_AjMZzt7A@mail.gmail.com>
References:  <CAJ-VmomchJZ7GUKrAjmmyBXDw-6H6O5fAxT_tfAFfhU=HknG1g@mail.gmail.com> <201210212322.48791.zec@fer.hr> <CAJ-VmokH2VqK-5of2%2B79mKbQ9m61tTvdqCCSJkj3EPejmDaH=A@mail.gmail.com> <201210221208.37592.zec@fer.hr> <CAJ-VmokU2yY39y0BO8QroJWK8YUUZG=WtakxjMpd%2B_AjMZzt7A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/22/12 7:12 AM, Adrian Chadd wrote:
> On 22 October 2012 03:08, Marko Zec <zec@fer.hr> wrote:
>
>> The only option I can think of now is to update all of the hotunpluggable
>> device_detach() handlers to do CURVNET_SET(ifp->if_vnet) before calling
>> further down into the networking stack, because as you already observed,
>> whatever triggers a device_detach() handler is not aware of the nature of
>> the driver.
> Right. Well, since most things are in theory hotpluggable these days
> (or soon will be, with pcie hotplug), I think we need a slightly more
> generic solution.
>
>>> (how the hell does this work for devices attached at probe time? What
>>> vnet context do they have, and why doesn't the kernel panic there?)
>> Because at boot / autoconfiguration time curvnet is implicitly set to vnet0
>> between SI_SUB_VNET and SI_SUB_VNET_DONE (i.e. before going SMP).
>>
>> Similarly, curvnet is set to vnet0 during kldload events.
> .. like this.
>
> The trouble is going to be handling unplug and kldunload events too.
> Does curvnet -> vnet0 during kldunload events?

I think in unload events we probably need to cycle through all vnets and
do individual shutdowns of  anything that is set up on that vnet..
(but I'm not reading the code to say that, it's possible to ignore me 
safely)
>
> Thanks,
>
>
>
> Adrian
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>




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