Linus Torvalds writes: (Summary) [ Ben - feel free to post the missing emails to lkml too ]
[ Ben - feel free to post the missing emails to lkml too ]
On Sat, Jun 30, 2018 at 6:56 PM Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
That's only true if the underlying subsystem doesn't have any serialization itself.
serialization itself.
Which I don't think is normal.
Which I don't think is normal.
IOW, if you have (say) a PCI hotplug model, the PCI layer will have the pci_hp_mutex, for example, which protects the PCI hotplug slot lists and the kobj things.
lists and the kobj things.
Those locks won't protect kobj races in _general_ (ie there is no locking between two totally unrelated buses), but they *should* serialize the case of a device being added within one class.
[...]
during that window.That's only true if the underlying subsystem doesn't have any serialization itself.
serialization itself.
Which I don't think is normal.
Which I don't think is normal.
IOW, if you have (say) a PCI hotplug model, the PCI layer will have the pci_hp_mutex, for example, which protects the PCI hotplug slot lists and the kobj things.
lists and the kobj things.
Those locks won't protect kobj races in _general_ (ie there is no locking between two totally unrelated buses), but they *should* serialize the case of a device being added within one class.