kobject_init() sets kobj->subsys wrong?

From: Matt_Domsch@Dell.com
Date: Fri Jan 03 2003 - 19:06:57 EST


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/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:23 EST