Messages in this thread |  | | | Date | Tue, 13 May 2008 11:23:33 -0700 (PDT) | | From | "Randy.Dunlap" <> | | Subject | Re: [PATCH] Fix kobject_rename and !CONFIG_SYSFS v2 | |
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.
--
~Randy
|  |