android_kernel_motorola_sm6225/arch/x86/platform/uv
Thomas Gleixner c0c489e543 irqdomain/treewide: Keep firmware node unconditionally allocated
[ Upstream commit e3beca48a45b5e0e6e6a4e0124276b8248dcc9bb ]

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: 711419e504eb ("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:16:46 +02:00
..
bios_uv.c x86/platform/UV: Use efi_runtime_lock to serialise BIOS calls 2019-02-20 10:25:48 +01:00
Makefile x86/UV: Move NMI support 2013-09-24 09:02:02 +02:00
tlb_uv.c Merge branch 'l1tf-final' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-08-14 09:46:06 -07:00
uv_irq.c irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-29 10:16:46 +02:00
uv_nmi.c x86: Fix Sparse warnings about non-static functions 2017-12-06 19:32:58 +01:00
uv_sysfs.c x86/platform/UV: Add obtaining GAM Range Table from UV BIOS 2016-05-04 08:48:50 +02:00
uv_time.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00