TencentOS-kernel/arch
Jon Derrick cb159f2636 irqdomain/treewide: Free firmware node after domain removal
commit ec0160891e387f4771f953b888b1fe951398e5d9 upstream.

Commit 711419e504eb ("irqdomain: Add the missing assignment of
domain->fwnode for named fwnode") unintentionally caused a dangling pointer
page fault issue on firmware nodes that were freed after IRQ domain
allocation. Commit e3beca48a45b fixed that dangling pointer issue by only
freeing the firmware node after an IRQ domain allocation failure. That fix
no longer frees the firmware node immediately, but leaves the firmware node
allocated after the domain is removed.

The firmware node must be kept around through irq_domain_remove, but should be
freed it afterwards.

Add the missing free operations after domain removal where where appropriate.

Fixes: e3beca48a45b ("irqdomain/treewide: Keep firmware node unconditionally allocated")
Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>	# drivers/pci
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1595363169-7157-1-git-send-email-jonathan.derrick@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-16 16:33:54 +08:00
..
alpha scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2021-03-16 16:31:54 +08:00
arc ARC: elf: use right ELF_ARCH 2021-03-16 16:31:39 +08:00
arm ARM: 8992/1: Fix unwind_frame for clang-built kernels 2021-03-16 16:33:54 +08:00
arm64 arm64: dts: hisilicon: hikey: fixes to comply with adi, adv7533 DT binding 2021-03-16 16:33:21 +08:00
c6x Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
csky csky: Fixup abiv2 syscall_trace break a4 & a5 2021-03-16 16:28:56 +08:00
h8300 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hexagon hexagon: define ioremap_uc 2021-03-16 16:27:29 +08:00
ia64 scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2021-03-16 16:31:54 +08:00
m68k m68k: mac: Fix IOP status/control register writes 2021-03-16 16:33:15 +08:00
microblaze Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mips irqdomain/treewide: Free firmware node after domain removal 2021-03-16 16:33:54 +08:00
nds32 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
nios2 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
openrisc openrisc: Fix issue with argument clobbering for clone/fork 2021-03-16 16:30:27 +08:00
parisc parisc: Implement __smp_store_release and __smp_load_acquire barriers 2021-03-16 16:33:54 +08:00
powerpc powerpc/boot: Fix CONFIG_PPC_MPC52XX references 2021-03-16 16:33:42 +08:00
riscv RISC-V: Set maximum number of mapped pages correctly 2021-03-16 16:32:57 +08:00
s390 s390/maccess: add no DAT mode to kernel_write 2021-03-16 16:31:41 +08:00
sh sh: Fix validation of system call number 2021-03-16 16:32:50 +08:00
sparc scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2021-03-16 16:31:54 +08:00
um um: ensure `make ARCH=um mrproper` removes arch/$(SUBARCH)/include/generated/ 2021-03-16 16:27:11 +08:00
unicore32 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
x86 irqdomain/treewide: Free firmware node after domain removal 2021-03-16 16:33:54 +08:00
xtensa xtensa: update *pos in cpuinfo_op.next 2021-03-16 16:32:19 +08:00
.gitignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00