lkml.org 
[lkml]   [2005]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/5] kobject_hotplug() should use kobject_name()
Date
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>
---

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-04-26 09:39    [W:0.200 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site