Crash while iterating over devices and resource

Matthew Dillon dillon at apollo.backplane.com
Sat May 5 10:02:57 PDT 2007


    One other thing I noticed with BUS_GET_RESOURCE_LIST is that those few
    drivers which implement it do recurse up one level.  So, for example,
    ndis/if_ndis_pci.c calls BUS_GET_RESOURCE_LIST() expecting to get
    the resources from the pci bus device.  The method is really only used
    for PCI busses.

    I'm not sure resources can be properly iterated using that DEVMETHOD,
    even with the changes made to the default.  By definition the
    implementation is picking up the resources from a parent device,
    not the device the method is being called on.

    The whole thing is a real mess.  The original implementation never
    separated child functions from parent functions in the DEVMETHOD
    namespace so some DEVMETHODs take the parent device as an argument
    and some don't.  Yuch.

						-Matt






More information about the Kernel mailing list