linux-stable/drivers/pci
Thomas Gleixner e3beca48a4 irqdomain/treewide: Keep firmware node unconditionally allocated
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
2020-07-14 17:44:42 +02:00
..
controller irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-14 17:44:42 +02:00
endpoint Merge branch 'remotes/lorenzo/pci/rcar' 2020-06-04 12:59:18 -05:00
hotplug treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
pcie pci-v5.8-changes 2020-06-06 11:01:58 -07:00
switch PCI/switchtec: Correct bool variable type assignment 2020-05-21 15:21:53 -05:00
access.c PCI/AER: Save AER Capability for suspend/resume 2019-10-18 17:05:42 -05:00
ats.c PCI/ATS: Only enable ATS for trusted devices 2020-05-27 14:35:41 +02:00
bus.c PCI: Unexport pci_bus_get() and pci_bus_put() 2019-07-23 18:32:49 -05:00
ecam.c PCI: host-generic: Support building as modules 2020-05-01 16:29:27 +01:00
host-bridge.c
iov.c s390/pci: create links between PFs and VFs 2020-05-20 10:22:51 +02:00
irq.c
Kconfig Merge branch 'pci/trivial' 2019-11-28 08:54:55 -06:00
Makefile PCI: Allow building PCIe things without PCIEPORTBUS 2019-11-21 07:52:33 -06:00
mmap.c PCI: Fix typos and whitespace errors 2019-07-09 07:24:53 -05:00
msi.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
of.c PCI: of: Zero max-link-speed value is invalid 2020-05-18 14:40:38 +01:00
p2pdma.c PCI/P2PDMA: Add AMD Zen Raven and Renoir Root Ports to whitelist 2020-04-23 14:54:51 -05:00
pci-acpi.c PCI: Rename _DSM constants to align with spec 2020-05-27 16:48:21 -05:00
pci-bridge-emul.c PCI: pci-bridge-emul: Eliminate the 'reserved' member 2020-05-22 12:39:35 +01:00
pci-bridge-emul.h PCI: pci-bridge-emul: Fix big-endian support 2019-10-17 12:42:48 +01:00
pci-driver.c PM: sleep: core: Rename dev_pm_smart_suspend_and_suspended() 2020-04-24 21:32:41 +02:00
pci-label.c PCI: Rename _DSM constants to align with spec 2020-05-27 16:48:21 -05:00
pci-mid.c PCI: intel-mid: Convert to new X86 CPU match macros 2020-03-24 21:35:06 +01:00
pci-pf-stub.c PCI: Fix typos and whitespace errors 2019-07-09 07:24:53 -05:00
pci-stub.c
pci-sysfs.c Merge branch 'pci/misc' 2020-04-02 14:26:38 -05:00
pci.c Merge branch 'pci/pm' 2020-06-04 12:59:12 -05:00
pci.h Merge branch 'pci/enumeration' 2020-04-02 14:26:32 -05:00
probe.c pci-v5.8-changes 2020-06-06 11:01:58 -07:00
proc.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
quirks.c pci-v5.8-changes 2020-06-06 11:01:58 -07:00
remove.c PCI: Fix pci_host_bridge struct device release/free handling 2020-05-14 16:36:35 -05:00
rom.c PCI: Use ioremap(), not phys_to_virt() for platform ROM 2020-03-30 09:52:23 -05:00
search.c Merge branch 'pci/host-vmd' 2020-01-29 17:00:02 -06:00
setup-bus.c Merge branch 'remotes/lorenzo/pci/host-generic' 2020-06-04 12:59:16 -05:00
setup-irq.c
setup-res.c PCI: Allow pci_resize_resource() for devices on root bus 2020-05-01 12:28:35 -05:00
slot.c PCI: Add pci_speed_string() 2020-03-10 14:05:33 -05:00
syscall.c PCI: Lock down BAR access when the kernel is locked down 2019-08-19 21:54:15 -07:00
vc.c Merge branch 'pci/trivial' 2019-09-23 16:10:31 -05:00
vpd.c PCI/VPD: Prevent VPD access for Amazon's Annapurna Labs Root Port 2019-09-16 14:10:09 +01:00
xen-pcifront.c xen/pci: Get rid of verbose_request and use dev_dbg() instead 2020-05-29 10:44:59 -05:00