Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759598AbXITHnn (ORCPT ); Thu, 20 Sep 2007 03:43:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754068AbXITHne (ORCPT ); Thu, 20 Sep 2007 03:43:34 -0400 Received: from mtagate1.de.ibm.com ([195.212.29.150]:30139 "EHLO mtagate1.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751727AbXITHnd (ORCPT ); Thu, 20 Sep 2007 03:43:33 -0400 Date: Thu, 20 Sep 2007 09:42:21 +0200 From: Cornelia Huck To: Greg KH Cc: Mariusz Kozlowski , Andrew Morton , linux-kernel@vger.kernel.org Subject: kobject: Temporarily save k_name on cleanup for debug message. Message-ID: <20070920094221.59b78cfd@gondolin.boeblingen.de.ibm.com> In-Reply-To: <20070919200205.057e3fbc@gondolin.boeblingen.de.ibm.com> References: <20070918011841.2381bd93.akpm@linux-foundation.org> <200709182345.13435.m.kozlowski@tuxland.pl> <20070919102716.09004317@gondolin.boeblingen.de.ibm.com> <200709191843.54902.m.kozlowski@tuxland.pl> <20070919200205.057e3fbc@gondolin.boeblingen.de.ibm.com> Organization: IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter =?ISO-8859-15?Q?Gesch=E4ftsf=FChrung:?= Herbert Kircher Sitz der Gesellschaft: =?ISO-8859-15?Q?B=F6blingen?= Registergericht: Amtsgericht Stuttgart, HRB 243294 X-Mailer: Claws Mail 3.0.0 (GTK+ 2.10.13; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1562 Lines: 46 On Wed, 19 Sep 2007 20:02:05 +0200, Cornelia Huck wrote: > > kobject drivers: cleaning up > > kobject '' does not have a release() function, if this is not a directory kobject, it is broken and must be fixed. > > printing this debug message, it looks a bit odd :)> kobject: Temporarily save k_name on cleanup for debug message. Signed-off-by: Cornelia Huck --- lib/kobject.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) --- linux-2.6.orig/lib/kobject.c +++ linux-2.6/lib/kobject.c @@ -498,9 +498,9 @@ void kobject_cleanup(struct kobject * ko struct kobj_type * t = get_ktype(kobj); struct kset * s = kobj->kset; struct kobject * parent = kobj->parent; + const char *k_name = kobj->k_name; pr_debug("kobject %s: cleaning up\n",kobject_name(kobj)); - kfree(kobj->k_name); kobj->k_name = NULL; if (t && t->release) t->release(kobj); @@ -508,8 +508,8 @@ void kobject_cleanup(struct kobject * ko pr_debug("kobject '%s' does not have a release() function, " "if this is not a directory kobject, it is broken " "and must be fixed.\n", - kobject_name(kobj)); - + k_name); + kfree(k_name); if (s) kset_put(s); kobject_put(parent); - 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/