Re: [PATCH] Driver Core update and fixes for 2.6.1

From: Greg KH
Date: Mon Jan 19 2004 - 20:29:25 EST


ChangeSet 1.1505, 2004/01/19 16:57:07-08:00, greg@xxxxxxxxx

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

Thanks to Hollis Blanchard <hollisb@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/