From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Berg Subject: Re: [RFC][PATCH] Fix another namespace issue with devices assigned to classes Date: Mon, 07 Jun 2010 14:36:45 +0200 Message-ID: <1275914205.29978.10.camel@jlt3.sipsolutions.net> References: <1275484611.3915.11.camel@jlt3.sipsolutions.net> <20100602154608.GB12361@kroah.com> <1275493693.3915.12.camel@jlt3.sipsolutions.net> <1275495677.3915.16.camel@jlt3.sipsolutions.net> <1275498007.3915.20.camel@jlt3.sipsolutions.net> <1275501157.3915.22.camel@jlt3.sipsolutions.net> <1275506732.3915.41.camel@jlt3.sipsolutions.net> <1275634452.5189.1.camel@jlt3.sipsolutions.net> <1275640113.9953.8.camel@jlt3.sipsolutions.net> <1275829701.3615.54.camel@jlt3.sipsolutions.net> <1275903773.29978.1.camel@jlt3.sipsolutions.net> <1275905686.29978.3.camel@jlt3.sipsolutions.net> <1275910905.29978.7.camel@jlt3.sipsolutions.net> <1275913563.1823.1.camel@yio.site> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: "Eric W. Biederman" , Greg KH , netdev To: Kay Sievers Return-path: Received: from he.sipsolutions.net ([78.46.109.217]:55063 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750762Ab0FGMgx (ORCPT ); Mon, 7 Jun 2010 08:36:53 -0400 In-Reply-To: <1275913563.1823.1.camel@yio.site> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 2010-06-07 at 14:26 +0200, Kay Sievers wrote: > On Mon, Jun 7, 2010 at 13:41, Johannes Berg wrote: > > (mind you, I think we probably need to have the bus/driver assignment, > > but I wanted to try out your suggestion first) > > Class device can never have a driver. And unregistered drivers can > not be used, what you try to do here. That all should just be removed or > properly registered with the core if needed. Yeah but it shouldn't influence the operation? Anyway I see from your patch that I should have assigned the release function and that would've helped I guess. > > So I removed bus/driver assignment from the above code just to try it > > out, and got > > > > Device 'hwsim0' does not have a release() function, it is broken and > > must be fixed. > > The driver core expects the resources of the device to be freed on > release. You can provide an empty release function because you do this > from a global list of devices. Ok, makes sense. > > This has evolved far too much for me right now. Can we just apply the > > initial patch from Eric and be happier for a while? I can't justify > > spending this much time on it right now. Alternatively, you could look > > at hwsim too, since it's all virtual, nothing special is required, I do > > testing in a virtual machine ... > > > > current patch is at > > http://johannes.sipsolutions.net/patches/kernel/all/2010-06-07-11:41/hwsim-bus.patch > > Here is something that seems to work for me. I see you remove the driver. Does this mean that in sysfs these devices wouldn't have a driver symlink? ISTR that we needed that for userspace, but I'm not entirely sure, and I don't have all the relevant userspace in my test setup. johannes