kobject_init() sets kobj->subsys wrong?

Matt_Domsch@Dell.com
Fri, 3 Jan 2003 18:06:57 -0600


Pat, I need your help tracking this one down... :-)

Your recent patch creating find_bus("scsi") always returns NULL. I see
that's because bus_subsys.list is empty. Now, why is it empty, when the
SCSI driver did a bus_register()? It comes down to the code in
kobject_add(), where struct subsystem *s = kobj->subsys == NULL, thus the
list_add_tail code never gets called in there.

The calls go something like this:

scsi_sysfs_register()
bus_register(&scsi_bus_type)
subsystem_register(scsi_bus_type->subsys)
subsystem_init()
kobject_init() sets kobj->subsys = subsys_get(kobj->subsys) which
seems wrong
kobject_register()
kobject_add() where kobject->subsys is NULL

Strange, but true, and it may be kobject_init() that's borked setting
kobj->subsys.

Please advise.

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer, Architect
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

- 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/