2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 05:34:00 +08:00
linux-next/drivers/pci/host
Thomas Gleixner 2cf5a03cb2 PCI/keystone: Fix race in installing chained IRQ handler
Fix a race where a pending interrupt could be received and the handler
called before the handler's data has been setup, by converting to
irq_set_chained_handler_and_data().

Search and conversion was done with coccinelle:

@@
expression E1, E2, E3;
@@
(
-if (irq_set_chained_handler(E1, E3) != 0)
-   BUG();
|
-irq_set_chained_handler(E1, E3);
)
-irq_set_handler_data(E1, E2);
+irq_set_chained_handler_and_data(E1, E3, E2);

@@
expression E1, E2, E3;
@@
(
-if (irq_set_chained_handler(E1, E3) != 0)
-   BUG();
...
|
-irq_set_chained_handler(E1, E3);
...
)
-irq_set_handler_data(E1, E2);
+irq_set_chained_handler_and_data(E1, E3, E2);

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Murali Karicheri <m-karicheri2@ti.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
2015-06-25 11:57:01 +02:00
..
Kconfig PCI: iproc: Add Broadcom iProc PCIe support 2015-04-08 14:19:36 -05:00
Makefile PCI: iproc: Add Broadcom iProc PCIe support 2015-04-08 14:19:36 -05:00
pci-dra7xx.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pci-exynos.c PCI: exynos: Fix INTx enablement statement termination error 2015-04-08 14:26:54 -05:00
pci-host-generic.c ACPI and power management updates for v3.20-rc1 2015-02-10 15:09:41 -08:00
pci-imx6.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pci-keystone-dw.c PCI: keystone: Don't dereference possible NULL pointer 2015-04-09 14:34:10 -05:00
pci-keystone.c PCI/keystone: Fix race in installing chained IRQ handler 2015-06-25 11:57:01 +02:00
pci-keystone.h PCI/MSI: Rename "struct msi_chip" to "struct msi_controller" 2014-11-12 07:49:38 -07:00
pci-layerscape.c PCI: layerscape: Simplify platform_get_resource_byname() failure checking 2015-04-09 14:36:52 -05:00
pci-mvebu.c PCI: mvebu: Add suspend/resume support 2015-03-20 18:23:14 -05:00
pci-rcar-gen2.c PCI: rcar: Verify that mem_res is 64K-aligned 2015-02-24 00:24:19 -06:00
pci-tegra.c Merge branch 'pci/config' into next 2015-02-02 14:49:29 -06:00
pci-versatile.c Merge branches 'pci/host-exynos', 'pci/host-iproc', 'pci/host-keystone', 'pci/host-layerscape', 'pci/host-mvebu', 'pci/host-rcar' and 'pci/host-versatile' into next 2015-04-10 08:26:54 -05:00
pci-xgene.c PCI: xgene: Add register offset to config space base address 2015-03-05 22:14:21 -06:00
pcie-designware.c PCI: spear: Drop __initdata from spear13xx_pcie_driver 2015-03-06 11:47:28 -06:00
pcie-designware.h PCI/MSI: Rename "struct msi_chip" to "struct msi_controller" 2014-11-12 07:49:38 -07:00
pcie-iproc-platform.c PCI: iproc: Add Broadcom iProc PCIe support 2015-04-08 14:19:36 -05:00
pcie-iproc.c PCI: iproc: Add Broadcom iProc PCIe support 2015-04-08 14:19:36 -05:00
pcie-iproc.h PCI: iproc: Add Broadcom iProc PCIe support 2015-04-08 14:19:36 -05:00
pcie-rcar.c PCI: rcar: Change PCIEPARL and PCIEPARH to PCIEPALR and PCIEPAUR 2015-02-24 00:24:12 -06:00
pcie-spear13xx.c PCI: spear: Drop __initdata from spear13xx_pcie_driver 2015-03-06 11:47:28 -06:00
pcie-xilinx.c ACPI and power management updates for v3.20-rc1 2015-02-10 15:09:41 -08:00