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: Tue, 08 Jun 2010 17:06:30 +0200 Message-ID: <1276009590.3706.135.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> <1275914205.29978.10.camel@jlt3.sipsolutions.net> <1275989260.3706.115.camel@jlt3.sipsolutions.net> <1275990325.3706.116.camel@jlt3.sipsolutions.net> <1275998127.1899.38.camel@yio.site> <1275998603.3706.118.camel@jlt3.sipsolutions.net> <1276005970.3706.132.camel@jlt3.sipsolutions.net> <1276007174.3706.133.camel@jlt3.sipsolutions.net> 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]:37558 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751716Ab0FHPGe (ORCPT ); Tue, 8 Jun 2010 11:06:34 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 2010-06-08 at 16:47 +0200, Kay Sievers wrote: > > So ... can we apply Eric's patch for now then? > > It might break other stuff we don't know about yet. Just like we did > not know about what things hwsim is doing here. :) True. > The hwsim issues are caused by the current hwsim code, by doing things > it should not do. Class devices of different classes must never be > stacked (the core should not allow that in the first place). Class > devices must never have a driver assigned behind its back. Also > device_create() should not be used for devices without a major/minor > (but that seems to be done in several other places too). Back when hwsim was written that would have been useful feedback to whoever did ... now, not so much. > To fix the hwsim driver core interaction, core changes will probably > be needed to allow network modules to be removed while their devices > are active. That's something which seems not to work for bus devices > currently. Well it just needs to pin the module refcount from the bus and/or device struct. That seems not too hard? johannes