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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
---

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux