From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753812AbZF1NDN (ORCPT ); Sun, 28 Jun 2009 09:03:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751216AbZF1NC7 (ORCPT ); Sun, 28 Jun 2009 09:02:59 -0400 Received: from mail-bw0-f213.google.com ([209.85.218.213]:45303 "EHLO mail-bw0-f213.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751466AbZF1NC7 convert rfc822-to-8bit (ORCPT ); Sun, 28 Jun 2009 09:02:59 -0400 MIME-Version: 1.0 In-Reply-To: References: <20090626143652.GB6281@localdomain.by> <20090626144949.GA24173@suse.de> <20090626232339.GD3858@localdomain.by> <20090627093932.GB3342@localdomain.by> <1246147018.24693.97.camel@yio.site> From: Kay Sievers Date: Sun, 28 Jun 2009 15:02:46 +0200 Message-ID: Subject: Re: [PATCH] kobject_set_name_vargs memory leak To: "Eric W. Biederman" Cc: Sergey Senozhatsky , Greg KH , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 28, 2009 at 14:07, Eric W. Biederman 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? :) 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’ Documentation/kobject.txt would also need an update then. Thanks, Kay