lkml.org 
[lkml]   [2009]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/24] sysfs: Normalize removing sysfs directories.
Hello,

Eric W. Biederman wrote:
> I guess we are going to have to disagree on this one.

Yeap, seems like it.

> My take is simply that a correct user has to wait until no one else
> can find the kobject before calling kobject_del. At which point
> races are impossible, and it doesn't matter if sysfs_mutex is held
> across the entire operation.

This one also is a matter of degree. Way back when users could crash
sysfs reliably from userland, the sysfs code had a lot of assumptions
about object lifetime and synchronizaion which even the sysfs code
itself didn't really follow leading to fragility. My focus while
restructuring the code was to make the code behave as expected by the
usual conventions. It could be that I'm a bit paranoid about this,
but in general I really don't like when low level code doesn't do its
due diligence to save several hours of effort to implement clean
semantics, but again there's nothing wrong with your due and my due
being different.

I guess I'll have to pass the buck to Greg again with my rather strong
NACK.

> For the long term I still intend to kill __sysfs_remove_dir. Just
> not in this patch series.

Yeah, sysfs code is in the middle of two sane ways. sysfs either has
to deal with children creation/removal including atomicity of the
operations or it should force its users to do so. I prefer the former
but any would be better than the current situation.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2009-05-30 15:23    [W:0.100 / U:5.184 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site