Message from discussion
VIMAGE crashes on 9.x with hotplug net80211 devices
Received: by 10.66.84.34 with SMTP id v2mr6361414pay.38.1351475864966;
Sun, 28 Oct 2012 18:57:44 -0700 (PDT)
Path: 6ni48303pbd.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!news-hub.siol.net!news.mi.ras.ru!goblin3!goblin.stu.neva.ru!newsfeed3.funet.fi!newsfeeds.funet.fi!uio.no!nntp.uio.no!.POSTED!not-for-mail
From: Adrian Chadd <adr...@freebsd.org>
Newsgroups: fa.freebsd.hackers
Subject: Re: VIMAGE crashes on 9.x with hotplug net80211 devices
Date: Mon, 22 Oct 2012 14:13:15 UTC
Organization: Internet mailing list
Lines: 34
Sender: owner-freebsd-hack...@freebsd.org
Message-ID: <fa.73Y1HDfhg469a9uiDvA/oT5a4nI@ifi.uio.no>
References: <fa.iUcC0+Zbw5G6GCY1F5X38VTaSZ4@ifi.uio.no> <fa.BvSK+OPAcfWvlHd33u8fW2xA+Yo@ifi.uio.no> <fa.2k6y5lhyesiPoMPYqIo8NgrpWyk@ifi.uio.no> <fa.7avj9aokDxdVR2R61dzpdHJMeKU@ifi.uio.no>
NNTP-Posting-Host: mail-jess.uio.no
Mime-Version: 1.0
X-Trace: readme.uio.no 1350915195 12775 129.240.7.9 (22 Oct 2012 14:13:15 GMT)
X-Complaints-To: abuse@uio.no
NNTP-Posting-Date: Mon, 22 Oct 2012 14:13:15 +0000 (UTC)
Cc: freebsd-...@freebsd.org, freebsd-hack...@freebsd.org
To: Marko Zec <z...@fer.hr>
Delivered-To: freebsd-hack...@freebsd.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=mime-version:sender:in-reply-to:references:date
:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
bh=67VTMkU+JlSCEgDpiB3cOxrzm5fnUFdT+yPtDiIMd9U=;
b=ORw5bAAjR9UDGrpbE2k+zuzSz33FBWtUb3vJUUIDSpRIMBZCeo2VupiFYpMxybDlO8
SlhJfZdJsQSL8hcqjIrEI+SJClt7xvPJ6/2Ul/Mta/k3GpMG/bJ8IdlItOg5Nl9Je0AC
9XJgivnUvlxA5ToP/TUfUe9PHbvCPklMOVthAyI9t6mqCvE/rn9W9U6ETkNOd/xydYmz
D6eg+SlQL7VKRIPEdcs/e5LDBJCF2NmYkI8+PSqhMDkedukDFqd5Xg68Z4nVA/5JPfZX
rBY55JF0bwZp3VyfDK2EQiLols++EnqxIeZLeJDOfUgYt3yDVago1BfXaZnBOvsr797r
BxlQ==
In-Reply-To: <201210221208.37592.zec@fer.hr>
X-BeenThere: freebsd-hack...@freebsd.org
X-Mailman-Version: 2.1.14
List-Id: Technical Discussions relating to FreeBSD
<freebsd-hackers.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-hackers>,
<mailto:freebsd-hackers-requ...@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers>
List-Post: <mailto:freebsd-hack...@freebsd.org>
List-Help: <mailto:freebsd-hackers-requ...@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>,
<mailto:freebsd-hackers-requ...@freebsd.org?subject=subscribe>
Original-Date: Mon, 22 Oct 2012 07:12:57 -0700
Original-Message-Id: <CAJ-VmokU2yY39y0BO8QroJWK8YUUZG=WtakxjMpd+_AjMZz...@mail.gmail.com>
Original-References: <CAJ-VmomchJZ7GUKrAjmmyBXDw-6H6O5fAxT_tfAFfhU=Hkn...@mail.gmail.com>
<201210212322.48791....@fer.hr>
<CAJ-VmokH2VqK-5of2+79mKbQ9m61tTvdqCCSJkj3EPejmDa...@mail.gmail.com>
<201210221208.37592....@fer.hr>
Bytes: 4148
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
On 22 October 2012 03:08, Marko Zec <z...@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
_______________________________________________
freebsd-hack...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"