Date: Mon, 22 Oct 2012 07:12:57 -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-VmokU2yY39y0BO8QroJWK8YUUZG=WtakxjMpd%2B_AjMZzt7A@mail.gmail.com> In-Reply-To: <201210221208.37592.zec@fer.hr> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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? Thanks, Adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokU2yY39y0BO8QroJWK8YUUZG=WtakxjMpd%2B_AjMZzt7A>