1
0
Fork 0
alistair23-linux/arch/mips/pci
Thomas Gleixner 36f7355545 irqdomain/treewide: Keep firmware node unconditionally allocated
[ Upstream commit e3beca48a4 ]

Quite some non OF/ACPI users of irqdomains allocate firmware nodes of type
IRQCHIP_FWNODE_NAMED or IRQCHIP_FWNODE_NAMED_ID and free them right after
creating the irqdomain. The only purpose of these FW nodes is to convey
name information. When this was introduced the core code did not store the
pointer to the node in the irqdomain. A recent change stored the firmware
node pointer in irqdomain for other reasons and missed to notice that the
usage sites which do the alloc_fwnode/create_domain/free_fwnode sequence
are broken by this. Storing a dangling pointer is dangerous itself, but in
case that the domain is destroyed later on this leads to a double free.

Remove the freeing of the firmware node after creating the irqdomain from
all affected call sites to cure this.

Fixes: 711419e504 ("irqdomain: Add the missing assignment of domain->fwnode for named fwnode")
Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/873661qakd.fsf@nanos.tec.linutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-29 10:18:28 +02:00
..
Makefile MIPS: SGI-IP27: use generic PCI driver 2019-05-09 16:39:27 -07:00
fixup-ath79.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fixup-bcm63xx.c MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
fixup-capcella.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-cobalt.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-emma2rh.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-fuloong2e.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fixup-ip32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fixup-jmr3927.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-lantiq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fixup-lemote2f.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fixup-loongson3.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-malta.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fixup-mpc30x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-pmcmsp.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-rbtx4927.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-rbtx4938.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-rc32434.c mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
fixup-sb1250.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fixup-sni.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-tb0219.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-tb0226.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-tb0287.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
msi-octeon.c Disable MSI also when pcie-octeon.pcie_disable on 2019-01-10 10:57:13 -08:00
msi-xlp.c MIPS: Netlogic: Use chip_data for irq_chip methods 2015-09-03 12:08:03 +02:00
ops-bcm63xx.c MIPS: BCM63XX: Mark expected switch fall-through 2019-08-05 18:25:30 -07:00
ops-bonito64.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
ops-emma2rh.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ops-gt64xxx_pci0.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
ops-lantiq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ops-loongson2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 352 2019-06-05 17:37:09 +02:00
ops-loongson3.c MIPS/PCI: Let Loongson-3 pci_ops access extended config space 2018-09-19 18:57:30 -07:00
ops-mace.c PCI: Remove unnecessary #includes of <asm/pci.h> 2015-06-08 07:56:09 -05:00
ops-msc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
ops-nile4.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ops-pmcmsp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ops-rc32434.c mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
ops-sni.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
ops-tx3927.c mips: Update the email address of Geert Uytterhoeven 2014-06-02 16:34:41 +02:00
ops-tx4927.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ops-vr41xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-alchemy.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci-ar71xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-ar724x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-ar2315.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
pci-bcm47xx.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-bcm63xx.c MIPS: BCM63XX: add support for BCM3368 Cable Modem 2013-07-01 15:10:53 +02:00
pci-bcm63xx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci-bcm1480.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-bcm1480ht.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-emma2rh.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-generic.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pci-ip27.c MIPS: SGI-IP27: use generic PCI driver 2019-05-09 16:39:27 -07:00
pci-ip32.c MIPS: make PCI_DMA_BUS_IS_PHYS=1 constant 2016-05-13 14:02:17 +02:00
pci-lantiq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-lantiq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-lasat.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-legacy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pci-malta.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
pci-mt7620.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-octeon.c MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled 2019-01-29 11:47:02 -08:00
pci-rc32434.c MIPS: RC32434: fix broken PCI resource initialization 2014-05-26 09:02:06 +02:00
pci-rt2880.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-rt3883.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-sb1250.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-tx4927.c MIPS: TXx9: Modernize printing of kernel messages 2017-01-03 16:34:32 +01:00
pci-tx4938.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-tx4939.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-virtio-guest.c MIPS: paravirt: Add pci controller for virtio 2014-06-02 12:34:20 +02:00
pci-vr41xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-vr41xx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-xlp.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-xlr.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-xtalk-bridge.c irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-29 10:18:28 +02:00
pci.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pcie-octeon.c MIPS: Octeon: Unify QLM data types in CIU header. 2018-07-03 16:00:43 -07:00