PCI/MSI: Protect MSI operations
authorThomas Gleixner <tglx@linutronix.de>
Mon, 6 Dec 2021 22:51:13 +0000 (23:51 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 16 Dec 2021 21:22:17 +0000 (22:22 +0100)
commit5512c5eaf533a98d33a8dc0dcf415e72773184c8
tree798fc6dc0a2c95cb0b19fe92376ea5a62544ddf4
parent645474e2cee450131e8b8d8a69a5d9bbabd43f3f
PCI/MSI: Protect MSI operations

To prepare for dynamic extension of MSI-X vectors, protect the MSI
operations for MSI and MSI-X. This requires to move the invocation of
irq_create_affinity_masks() out of the descriptor lock section to avoid
reverse lock ordering vs. CPU hotplug lock as some callers of the PCI/MSI
allocation interfaces already hold it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Michael Kelley <mikelley@microsoft.com>
Tested-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20211206210747.982292705@linutronix.de
drivers/pci/msi/irqdomain.c
drivers/pci/msi/msi.c