lkml.org 
[lkml]   [2008]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] Fix kobject_rename and !CONFIG_SYSFS v2
"Randy.Dunlap" <rdunlap@xenotime.net> writes:

> On Tue, 13 May 2008, Eric W. Biederman wrote:
>
>> Changelog:
>> v2: Added a declaration of kboject_set_name to sysfs.h
>> so the code actually compiles with !CONFIG_SYSFS.
>>
>> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
>> ---
>> Documentation/kobject.txt | 4 ++++
>> drivers/base/core.c | 5 +++++
>> include/linux/sysfs.h | 4 +++-
>> lib/kobject.c | 18 +++++-------------
>> 4 files changed, 17 insertions(+), 14 deletions(-)
>>
>> diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt
>> index bf3256e..79184b4 100644
>> --- a/Documentation/kobject.txt
>> +++ b/Documentation/kobject.txt
>> @@ -118,6 +118,10 @@ the name of the kobject, call kobject_rename():
>>
>> int kobject_rename(struct kobject *kobj, const char *new_name);
>>
>> +Note kobject_rename does perform any locking or have a solid notion of
>
> ^not
>
>> +what names are valid so the provide must provide their own sanity checking
> ~~~~~~~
> caller
>
>> +and serialization.
>> +
>> There is a function called kobject_set_name() but that is legacy cruft and
>> is being removed. If your code needs to call this function, it is
>> incorrect and needs to be fixed.


Good catch.

Thanks Randy.

Eric


\
 
 \ /
  Last update: 2008-05-13 22:53    [W:0.071 / U:31.312 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site