From owner-freebsd-net@FreeBSD.ORG Fri Nov 16 04:53:31 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B4C4219D for ; Fri, 16 Nov 2012 04:53:31 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob13.myregisteredsite.com (atl4mhob13.myregisteredsite.com [209.17.115.51]) by mx1.freebsd.org (Postfix) with ESMTP id 605068FC12 for ; Fri, 16 Nov 2012 04:53:31 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob13.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAG4rPwX000772 for ; Thu, 15 Nov 2012 23:53:25 -0500 Received: (qmail 8537 invoked by uid 0); 16 Nov 2012 04:53:25 -0000 Received: (qmail 24219 invoked by uid 0); 15 Nov 2012 21:50:18 -0000 Received: from unknown (HELO atl4mhib33.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 21:50:18 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib33.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFLoHrY019905 for ; Thu, 15 Nov 2012 16:50:17 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 76FE53B6A9B; Thu, 15 Nov 2012 21:50:03 +0000 (UTC) Received: from hub.freebsd.org (hub.freebsd.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id B9D61851; Thu, 15 Nov 2012 21:50:03 +0000 (UTC) (envelope-from owner-freebsd-hackers@freebsd.org) Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 07013725; Thu, 15 Nov 2012 21:49:49 +0000 (UTC) (envelope-from zec@fer.hr) Received: from mail.zvne.fer.hr (mail.zvne.fer.hr [161.53.66.5]) by mx1.freebsd.org (Postfix) with ESMTP id 773698FC16; Thu, 15 Nov 2012 21:49:48 +0000 (UTC) Received: from munja.zvne.fer.hr (161.53.66.248) by mail.zvne.fer.hr (161.53.66.5) with Microsoft SMTP Server id 14.2.318.4; Thu, 15 Nov 2012 22:49:45 +0100 Received: from sluga.fer.hr ([161.53.66.244]) by munja.zvne.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Thu, 15 Nov 2012 22:49:41 +0100 Received: from localhost ([161.53.19.8]) by sluga.fer.hr over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 15 Nov 2012 22:49:41 +0100 From: Marko Zec To: Hans Petter Selasky , Adrian Chadd Subject: Re: VIMAGE crashes on 9.x with hotplug net80211 devices Date: Thu, 15 Nov 2012 22:49:35 +0100 User-Agent: KMail/1.9.10 References: <201211152032.06181.hselasky@c2i.net> In-Reply-To: <201211152032.06181.hselasky@c2i.net> MIME-Version: 1.0 Content-Disposition: inline Message-ID: <201211152249.36161.zec@fer.hr> X-OriginalArrivalTime: 15 Nov 2012 21:49:41.0438 (UTC) FILETIME=[1DF19DE0:01CDC37B] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-freebsd-hackers@freebsd.org Sender: owner-freebsd-hackers@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes Cc: freebsd-hackers@freebsd.org, freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 04:53:31 -0000 On Thursday 15 November 2012 20:32:06 Hans Petter Selasky wrote: > On Thursday 15 November 2012 20:16:12 Adrian Chadd wrote: > > Hans brings up a very good point for USB - they split if_alloc and > > if_attach across two different threads. Fine, so maybe one of the following options could work: 1) pass the vnet context embedded in some other already available struct when forwarding request from 1st to 2nd thread; or 2) if we can safely assume that device attach events can only occur in context of vnet0 (and I think we can), place a few CURVNET_SET(vnet0) macros wherever necessary in 2nd USB "attach" thread. > > So this works for non-USB devices, but not for USB devices. Could you post a sample backtrace for me to look at? > > Hans, does each device implement its own workqueue for this kind of > > delayed action, or is there some generic work queue that is doing this > > work? > > Hi, > > I think a new thread is created for this stuff. It is inside the USB > subsystem, but would consider this a big *hack* to add VNET specific > stuff in there. > > Isn't it possible to have curvnet return "vnet0" when nothing else is > set? No! This was discussed already at several ocassions, including earlier in this thread: with curvnet pointing by default to vnet0, it would be essentially impossible to detect, trace and debug leakages between vnets. Marko _______________________________________________ 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"