Skip to contentSkip to conversation

Fix a 64bit bug in kobject module request

PATCH New Andi Kleen 1 participant 1 message Mar 11, 2004 Driver core

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 Fix a 64bit bug in kobject module request

Quoted 2 lines

From Takashi Iwai

kobj_lookup had a 64bit bug, which caused the request of a unknown character device to burn CPU instead of failing quickly.

drivers/base/map.c +1 -1
diff -burpN -X ../KDIFX linux-vanilla/drivers/base/map.c linux-2.6.4-amd64/drivers/base/map.c
@@ -96,7 +96,7 @@ struct kobject *kobj_lookup(struct kobj_
 {
 	struct kobject *kobj;
 	struct probe *p;
-	unsigned best = ~0U;
+	unsigned long best = ~0UL;
 
 retry:
 	down_read(domain->sem);