Messages in this thread | | | From | (Eric W. Biederman) | Date | Sun, 28 Jun 2009 06:13:56 -0700 | Subject | Re: [PATCH] kobject_set_name_vargs memory leak |
| |
Kay Sievers <kay.sievers@vrfy.org> writes:
> On Sun, Jun 28, 2009 at 14:07, Eric W. Biederman<ebiederm@xmission.com> wrote: > >> But setting a kobject's name several times in a row is a bug. You >> need to call kobject_rename if you are going to change the name. > > Sure, we can define in that way. > >> So how about we fix the driver core not to do that. Stop treating fmt >> as a flag, and make it clear kobject_add should not be passed a name. > > Sounds fine to me. You did not try to compile your patch, right? :)
Only the lib/kobject bits...
> block/blk-sysfs.c: In function ‘blk_register_queue’: > block/blk-sysfs.c:436: error: implicit declaration of function ‘kobj_set_name’ > > drivers/base/driver.c: In function ‘driver_add_kobj’: > drivers/base/driver.c:149: error: too many arguments to function ‘kobject_add’
Ugh I totally missed that one.
> Documentation/kobject.txt would also need an update then.
As for the rules it already seems correct. But getting the prototype and mentioning kobject_set_name wouldn't hurt.
Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |