kernel_optimize_test/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
access.c
ats.c PCI/ATS: Only enable ATS for trusted devices 2020-05-27 14:35:41 +02:00
bus.c
ecam.c
host-bridge.c
iov.c
irq.c
Kconfig
Makefile
mmap.c
msi.c
of.c
p2pdma.c
pci-acpi.c PCI: Rename _DSM constants to align with spec 2020-05-27 16:48:21 -05:00
pci-bridge-emul.c
pci-bridge-emul.h
pci-driver.c
pci-label.c PCI: Rename _DSM constants to align with spec 2020-05-27 16:48:21 -05:00
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c
pci.c Merge branch 'pci/pm' 2020-06-04 12:59:12 -05:00
pci.h
probe.c pci-v5.8-changes 2020-06-06 11:01:58 -07:00
proc.c
quirks.c pci-v5.8-changes 2020-06-06 11:01:58 -07:00
remove.c
rom.c
search.c
setup-bus.c Merge branch 'remotes/lorenzo/pci/host-generic' 2020-06-04 12:59:16 -05:00
setup-irq.c
setup-res.c
slot.c
syscall.c
vc.c
vpd.c
xen-pcifront.c xen/pci: Get rid of verbose_request and use dev_dbg() instead 2020-05-29 10:44:59 -05:00