Message ID | 20100302185213.43a1a0d7.akpm@linux-foundation.org |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
Hello, Am Dienstag, den 02. März schrieb Andrew Morton: > It could be that some kobject on that list has become invalid (memory > was freed, module was unloaded, etc) and later code stumbled across the > now-invalid object on that list and then crashed. > > What we can do to find this is to add a diagnostic each time an object > is registered, and a diagnostic each time kset_find_obj() looks at the > objects. Then we'll see which kobject caused the crash, then we can > look back and see where that kobject was registered from. [...] > This will generate a lot of output and we don't want to lose any of it. > I'd suggest setting up netconsole so all the output can be reliably > saved: Documentation/networking/netconsole.txt I have a serial connection to a netbook. Log attached. MfG bmg
--- a/lib/kobject.c~a +++ a/lib/kobject.c @@ -717,6 +717,8 @@ int kset_register(struct kset *k) return -EINVAL; kset_init(k); + printk("kset_register:%p\n", &k->kobj); + dump_stack(); err = kobject_add_internal(&k->kobj); if (err) return err; @@ -751,9 +753,12 @@ struct kobject *kset_find_obj(struct kse spin_lock(&kset->list_lock); list_for_each_entry(k, &kset->list, entry) { - if (kobject_name(k) && !strcmp(kobject_name(k), name)) { - ret = kobject_get(k); - break; + if (kobject_name(k)) { + printk("kset_find_obj:%p\n", k); + if (!strcmp(kobject_name(k), name)) { + ret = kobject_get(k); + break; + } } } spin_unlock(&kset->list_lock);