[PATCH] kobject_hotplug() should use kobject_name()
authorDmitry Torokhov <dtor_core@ameritech.net>
Tue, 26 Apr 2005 07:29:58 +0000 (02:29 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Jun 2005 22:15:00 +0000 (15:15 -0700)
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@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
lib/kobject_uevent.c

index 2a4e7671eaf4089bc03f96fdfa133723494af71a..1ede5aa33376cbbf273a17a7fcbb0b6b7d1c77f3 100644 (file)
@@ -246,7 +246,7 @@ void kobject_hotplug(struct kobject *kobj, enum kobject_action action)
        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;