Re: [PATCH] Fix kobject_rename and !CONFIG_SYSFS v2
From: Eric W. Biederman <hidden>
Date: 2008-05-13 20:50:59
Also in:
lkml
"Randy.Dunlap" [off-list ref] writes:
On Tue, 13 May 2008, Eric W. Biederman wrote:quoted
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 <redacted> --- 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^notquoted
+what names are valid so the provide must provide their own sanity checking~~~~~~~ callerquoted
+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