At Greg K-H's request, I've been looking into locking the pci_devices list to protect it from being altered by hotplug while being traversed. So far I've limited my work to just the core pci code, only adding the pcidevlist_lock spinlock and using it to wrap all uses of pci_for_each_dev() or pci_devices. I'm planning to go on and lock all uses of pci_for_each_dev() in the driver and arch specific files, as well as the bus device lists (and later the bus lists), but I wanted to send this out for comments first. I don't really have any test cases for sanity checking, but it boots on an 8 way and running 50 "cat /proc/pci"s in parallel doesn't choke, so let me know if I've mistakenly broken anything.

Thanks
-john

(please CC me as I'm not sub'ed to the lists)

I apologize if this is a dup, evo crashed on send and I'm not sure if it made it out first.