From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [PATCH 10/11] avoid kobject name conflict with different namespaces Date: Fri, 09 May 2008 11:16:10 -0700 Message-ID: References: <20080506173030.653828076@theryb.frec.bull.fr> <20080506173335.922289888@theryb.frec.bull.fr> <20080507190838.GA4467@suse.de> <20080508102844.25642ef7@gondolin.boeblingen.de.ibm.com> <20080509073556.3c342d14@gondolin.boeblingen.de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: ebiederm@xmission.com (Eric W. Biederman), Greg KH , Benjamin Thery , linux-kernel@vger.kernel.org, Tejun Heo , Al Viro , Daniel Lezcano , "Serge E. Hallyn" , Pavel Emelyanov , netdev@vger.kernel.org To: Cornelia Huck Return-path: In-Reply-To: <20080509073556.3c342d14@gondolin.boeblingen.de.ibm.com> (Cornelia Huck's message of "Fri, 9 May 2008 07:35:56 +0200") Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Cornelia Huck writes: > On Thu, 08 May 2008 12:28:19 -0700, > ebiederm@xmission.com (Eric W. Biederman) wrote: > >> Do you remember if we have ever sorted out the race between _move >> and module unload/directory teardown at the sysfs level? > > Unfortunately I can't remember anything about this, do you have a > pointer to the original discussion? Ok the conversation was: "[Bluez-devel] Oops involving RFCOMM and sysfs" http://lkml.org/lkml/2007/12/28/87 Following the thread through it appears the bug was fixed and it wasn't the race Al Viro was concerned about. http://lkml.org/lkml/2008/1/9/59 And it looks like all of the symptoms have been corrected. Yeah! Which implies to me that kobject_move has the same locking restrictions that kobject_rename has. I.e. the upper level better do what it takes to make the operation safe. Which says that at least for now not worrying about the locking between sysfs_move_dir/sysfs_rename_dir and sysfs_remove_dir is ok. As we require the upper levels not to do that. Which says that we may be able to figure out how to merge sysfs_move_dir and sysfs_rename_dir. It is still a nasty business though. Eric