lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070920094221.59b78cfd@gondolin.boeblingen.de.ibm.com>
Date:	Thu, 20 Sep 2007 09:42:21 +0200
From:	Cornelia Huck <huckc@...ibm.com>
To:	Greg KH <gregkh@...e.de>
Cc:	Mariusz Kozlowski <m.kozlowski@...land.pl>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: kobject: Temporarily save k_name on cleanup for debug message.

On Wed, 19 Sep 2007 20:02:05 +0200,
Cornelia Huck <cornelia.huck@...ibm.com> wrote:

> > kobject drivers: cleaning up
> > kobject '<NULL>' does not have a release() function, if this is not a directory kobject, it is broken and must be fixed.
> 
> <Unrelated side note: We should probably save the kobject's name for
> printing this debug message, it looks a bit odd :)>

kobject: Temporarily save k_name on cleanup for debug message.

Signed-off-by: Cornelia Huck <cornelia.huck@...ibm.com>

---
 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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ