pci_bus_lock question
Is the intended purpose of pci_bus_lock to synchronize access to _just_ the global list of pci devices, or also to the pci_root_buses list?
If it is intended to protect the latter, I see many unfortunate places where it's not being used :)
Thanks-
John
But then, most of these violations are in __init functions. I think I just answered my own question :)
Thanks-
John
Quoted 8 lines · John Rose
Is the intended purpose of
pci_bus_lockto synchronize access to _just_ the global list of pci devices, or also to thepci_root_buseslist?If it is intended to protect the latter, I see many unfortunate places where it's not being used :)
Thanks-
John
Quoted 2 lines · John Rose
But then, most of these violations are in
__initfunctions. I think I just answered my own question :)
Yes, we don't protect the lists in those __init functions, as it isn't needed at that point in time.
thanks,
greg k-h
I need to remove a bus from the pci_root_buses() list, and I need to do so from a module. Would it be preferable to export the pci_bus_lock symbol or create wrappers in the PCI core that safely add/remove buses to/from this list?
I'm guessing the latter :)
Thanks-
John
Quoted 11 lines · Greg KH
Quoted 2 lines · John Rose
But then, most of these violations are in
__initfunctions. I think I just answered my own question :)Yes, we don't protect the lists in those
__initfunctions, as it isn't needed at that point in time.thanks,
greg k-h
Quoted 6 lines · John Rose
I need to remove a bus from the
pci_root_buses()list, and I need to do so from a module. Would it be preferable to export thepci_bus_locksymbol or create wrappers in the PCI core that safely add/remove buses to/from this list?I'm guessing the latter :)
Good guess :)
greg k-h