Look in subsys_attr_show(). It is being passed a kobject, which is a
member of a "struct sys_device". We can tell this because I printed out
the address of the sys device in sys_device_register(). A to_subsys()
is being performed on that object, which is wrong, because the kobject
is not a member of a "struct subsystem".
> > I'm getting a 0 as the node ID out of pure dumb luck. Is the NUMA code
> > broken or is sysfs?
> It's taking the ID from the system device of the node that's passed to
> ->show(). That is set in register_node(), so I'm not sure how they could
> get out of sync, unless I'm missing something obvious.
They're not out of sync, it's getting garbage because of the bogus
> BTW, I did request that the NUMA topology people take a look at these
> patches when I sent them a couple of weeks ago, so as to avoid this. :)
I'll cc him to make him feel bad :)
-- Dave Hansen email@example.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to firstname.lastname@example.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/