[PATCH 1/5] kobject_hotplug() should use kobject_name()

From: Dmitry Torokhov
Date: Tue Apr 26 2005 - 02:37:21 EST


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>
---

kobject_uevent.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

Index: dtor/lib/kobject_uevent.c
===================================================================
--- dtor.orig/lib/kobject_uevent.c
+++ dtor/lib/kobject_uevent.c
@@ -246,10 +246,10 @@ 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;
+ argv [1] = name;
argv [2] = NULL;

/* minimal command environment */
-
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/