lkml.org 
[lkml]   [2004]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] Driver Core update and fixes for 2.6.1
Date
From
ChangeSet 1.1505, 2004/01/19 16:57:07-08:00, greg@kroah.com

[PATCH] Kobject: prevent oops in kset_find_obj() if kobject_name() is NULL

Thanks to Hollis Blanchard <hollisb@us.ibm.com> for pointing this out.


lib/kobject.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/lib/kobject.c b/lib/kobject.c
--- a/lib/kobject.c Mon Jan 19 17:04:40 2004
+++ b/lib/kobject.c Mon Jan 19 17:04:40 2004
@@ -547,7 +547,7 @@
down_read(&kset->subsys->rwsem);
list_for_each(entry,&kset->list) {
struct kobject * k = to_kobj(entry);
- if (!strcmp(kobject_name(k),name)) {
+ if (kobject_name(k) && (!strcmp(kobject_name(k),name))) {
ret = k;
break;
}
-
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-03-22 14:00    [W:0.355 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site