PCI/MSI: Sanitize MSI-X table map handling
authorThomas Gleixner <tglx@linutronix.de>
Mon, 6 Dec 2021 22:27:54 +0000 (23:27 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 9 Dec 2021 10:52:22 +0000 (11:52 +0100)
commit85aa607e79f8343f1ea028b29bdf8b6bc99c729a
tree3e4c435cd20a16bf6316f50ac849e56b33f1a105
parentaa423ac4221abdfb8588751e7838ca5f42f56db3
PCI/MSI: Sanitize MSI-X table map handling

Unmapping the MSI-X base mapping in the loops which allocate/free MSI
descriptors is daft and in the way of allowing runtime expansion of MSI-X
descriptors.

Store the mapping in struct pci_dev and free it after freeing the MSI-X
descriptors.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20211206210224.871651518@linutronix.de
drivers/pci/msi/msi.c
include/linux/pci.h