Cornelia Huck [off-list ref] writes:
On Thu, 08 May 2008 12:28:19 -0700,
ebiederm@xmission.com (Eric W. Biederman) wrote:
quoted
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