twx-linux/drivers/pci/controller
Nam Cao d5c647b08e PCI: vmd: Fix wrong kfree() in vmd_msi_free()
vmd_msi_alloc() allocates struct vmd_irq and stashes it into
irq_data->chip_data associated with the VMD's interrupt domain.
vmd_msi_free() extracts the pointer by calling irq_get_chip_data() and
frees it.

irq_get_chip_data() returns the chip_data associated with the top interrupt
domain. This worked in the past because VMD's interrupt domain was the top
domain.

But d7d8ab87e3e7 ("PCI: vmd: Switch to msi_create_parent_irq_domain()")
changed the interrupt domain hierarchy so VMD's interrupt domain is not the
top domain anymore. irq_get_chip_data() now returns the chip_data at the
MSI devices' interrupt domains. It is therefore broken for vmd_msi_free()
to kfree() this chip_data.

Fix by extracting the chip_data associated with the VMD's interrupt domain.

Fixes: d7d8ab87e3e7 ("PCI: vmd: Switch to msi_create_parent_irq_domain()")
Reported-by: Kenneth Crudup <kenny@panix.com>
Closes: https://lore.kernel.org/linux-pci/dfa40e48-8840-4e61-9fda-25cdb3ad81c1@panix.com/
Reported-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Closes: https://lore.kernel.org/linux-pci/ed53280ed15d1140700b96cca2734bf327ee92539e5eb68e80f5bbbf0f01@linux.gnuweeb.org/
Tested-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Tested-by: Kenneth Crudup <kenny@panix.com>
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/20250807081051.2253962-1-namcao@linutronix.de
2025-08-07 11:30:12 -05:00
..
cadence PCI: cadence: Replace private message routing enums with PCI core definitions 2025-06-19 18:20:39 +05:30
dwc Merge branch 'pci/controller/sophgo' 2025-07-31 16:12:17 -05:00
mobiveil PCI: mobiveil: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:02 -05:00
plda Merge branch 'pci/controller/linkup-fix' 2025-07-31 16:11:47 -05:00
Kconfig PCI: vmd: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:16 -05:00
Makefile PCI: microchip: Move pcie-microchip-host.c to PLDA directory 2024-05-28 11:15:28 -05:00
pci-aardvark.c PCI: aardvark: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:15 -05:00
pci-ftpci100.c PCI: Switch to irq_domain_create_linear() 2025-05-16 21:06:10 +02:00
pci-host-common.c pci-v6.17-changes 2025-08-01 13:59:07 -07:00
pci-host-common.h PCI: host-generic: Rename and export gen_pci_init() for PCIe controller drivers 2025-07-01 20:01:26 +05:30
pci-host-generic.c PCI: host-common: Convert to library for host controller drivers 2025-05-30 12:21:57 -05:00
pci-hyperv-intf.c PCI: hv: Fix warnings for missing export.h header inclusion 2025-07-09 23:46:06 +00:00
pci-hyperv.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-07-24 11:10:46 -07:00
pci-ixp4xx.c
pci-loongson.c PCI: loongson: Enable MSI in LS7A Root Complex 2024-07-19 10:07:01 -05:00
pci-mvebu.c PCI: mvebu: Use devm_add_action_or_reset() instead of devm_add_action() 2025-07-23 22:02:50 +05:30
pci-rcar-gen2.c
pci-tegra.c PCI: tegra: Convert to MSI parent infrastructure 2025-05-16 21:32:20 +02:00
pci-thunder-ecam.c PCI: host-common: Convert to library for host controller drivers 2025-05-30 12:21:57 -05:00
pci-thunder-pem.c PCI: host-common: Convert to library for host controller drivers 2025-05-30 12:21:57 -05:00
pci-v3-semi.c
pci-versatile.c
pci-xgene-msi.c PCI: xgene-msi: Restructure handler setup/teardown 2025-07-22 15:33:16 -05:00
pci-xgene.c PCI: xgene: Drop XGENE_PCIE_IP_VER_UNKN 2025-07-22 15:33:16 -05:00
pcie-altera-msi.c PCI: altera-msi: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:15 -05:00
pcie-altera.c PCI: controller: Use dev_fwnode() instead of of_fwnode_handle() 2025-07-24 16:00:47 -05:00
pcie-apple.c PCI: apple: Add tracking of probed root ports 2025-06-30 12:29:05 -05:00
pcie-brcmstb.c Merge branch 'pci/misc' 2025-07-31 16:12:19 -05:00
pcie-hisi-error.c PCI: controller: Switch back to struct platform_driver::remove() 2024-10-03 16:44:49 -05:00
pcie-iproc-bcma.c
pcie-iproc-msi.c PCI: iproc: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:16 -05:00
pcie-iproc-platform.c PCI: controller: Switch back to struct platform_driver::remove() 2024-10-03 16:44:49 -05:00
pcie-iproc.c PCI: Rename CRS Completion Status to RRS 2024-09-10 19:52:30 -05:00
pcie-iproc.h
pcie-mediatek-gen3.c PCI: mediatek-gen3: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:16 -05:00
pcie-mediatek.c PCI: mediatek: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:16 -05:00
pcie-mt7621.c PCI: mt7621: Use helper function for_each_available_child_of_node_scoped() 2025-03-06 09:31:45 +00:00
pcie-rcar-ep.c PCI: endpoint: Align pci_epc_set_msi(), pci_epc_ops::set_msi() nr_irqs encoding 2025-05-28 16:47:56 -05:00
pcie-rcar-host.c PCI: rcar-host: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:16 -05:00
pcie-rcar.c
pcie-rcar.h
pcie-rockchip-ep.c PCI: rockchip: Use standard PCIe definitions 2025-07-07 17:19:12 -05:00
pcie-rockchip-host.c Merge branch 'pci/controller/rockchip-host' 2025-07-31 16:12:17 -05:00
pcie-rockchip.c PCI: rockchip: Refactor rockchip_pcie_disable_clocks() signature 2025-01-15 18:24:12 +00:00
pcie-rockchip.h PCI: rockchip: Use standard PCIe definitions 2025-07-07 17:19:12 -05:00
pcie-xilinx-common.h
pcie-xilinx-cpm.c PCI: Switch to irq_domain_create_linear() 2025-05-16 21:06:10 +02:00
pcie-xilinx-dma-pl.c PCI: xilinx-xdma: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:16 -05:00
pcie-xilinx-nwl.c PCI: xilinx-nwl: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:16 -05:00
pcie-xilinx.c PCI: xilinx: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:16 -05:00
vmd.c PCI: vmd: Fix wrong kfree() in vmd_msi_free() 2025-08-07 11:30:12 -05:00