From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758590AbYEMSX5 (ORCPT ); Tue, 13 May 2008 14:23:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756538AbYEMSXr (ORCPT ); Tue, 13 May 2008 14:23:47 -0400 Received: from xenotime.net ([66.160.160.81]:50152 "HELO xenotime.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753546AbYEMSXq (ORCPT ); Tue, 13 May 2008 14:23:46 -0400 Date: Tue, 13 May 2008 11:23:33 -0700 (PDT) From: "Randy.Dunlap" X-X-Sender: rddunlap@shark.he.net To: "Eric W. Biederman" cc: Greg KH , Benjamin Thery , Randy Dunlap , Greg KH , Andrew Morton , linux-kernel@vger.kernel.org, Tejun Heo , Al Viro , Daniel Lezcano , "Serge E. Hallyn" , Pavel Emelyanov , netdev@vger.kernel.org Subject: Re: [PATCH] Fix kobject_rename and !CONFIG_SYSFS v2 In-Reply-To: Message-ID: References: <20080512220232.GA16914@kroah.com> <4829A4BD.3020007@bull.net> <20080513164438.GA31563@kroah.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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