Re: [PATCH 10/11] avoid kobject name conflict with different namespaces

From: Eric W. Biederman
Date: Fri May 09 2008 - 14:20:51 EST


Cornelia Huck <cornelia.huck@xxxxxxxxxx> writes:

> On Thu, 08 May 2008 12:28:19 -0700,
> ebiederm@xxxxxxxxxxxx (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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/