[PATCH] kobject_hotplug() should use kobject_name()

From: Greg KH
Date: Mon Jun 20 2005 - 21:56:08 EST


[PATCH] kobject_hotplug() should use kobject_name()

kobject: kobject_hotplug should use kobject_name() instead of
accessing kobj->name directly since for objects with
long names it can contain garbage.

Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
commit eb11d8ffceead1eb3d84366f1687daf2217e883e
tree aedf84638f2bb8cc2d6f90120199191b917efa35
parent 8b22c249e7de453961e4d253b19fc2a0bdd65d53
author Dmitry Torokhov <dtor_core@xxxxxxxxxxxxx> Tue, 26 Apr 2005 02:29:58 -0500
committer Greg Kroah-Hartman <gregkh@xxxxxxx> Mon, 20 Jun 2005 15:15:00 -0700

lib/kobject_uevent.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -246,7 +246,7 @@ void kobject_hotplug(struct kobject *kob
if (hotplug_ops->name)
name = hotplug_ops->name(kset, kobj);
if (name == NULL)
- name = kset->kobj.name;
+ name = kobject_name(&kset->kobj);

argv [0] = hotplug_path;
argv [1] = name;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/