kernel_samsung_a53x/drivers/irqchip
Guanrui Huang 3bee58b401 irqchip/gic-v3-its: Prevent double free on error
commit c26591afd33adce296c022e3480dea4282b7ef91 upstream.

The error handling path in its_vpe_irq_domain_alloc() causes a double free
when its_vpe_init() fails after successfully allocating at least one
interrupt. This happens because its_vpe_irq_domain_free() frees the
interrupts along with the area bitmap and the vprop_page and
its_vpe_irq_domain_alloc() subsequently frees the area bitmap and the
vprop_page again.

Fix this by unconditionally invoking its_vpe_irq_domain_free() which
handles all cases correctly and by removing the bitmap/vprop_page freeing
from its_vpe_irq_domain_alloc().

[ tglx: Massaged change log ]

Fixes: 7d75bbb4bc1a ("irqchip/gic-v3-its: Add VPE irq domain allocation/teardown")
Signed-off-by: Guanrui Huang <guanrui.huang@linux.alibaba.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240418061053.96803-2-guanrui.huang@linux.alibaba.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 11:32:39 +01:00
..
alphascale_asm9260-icoll.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos-combiner.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-al-fic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-alpine-msi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-armada-370-xp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-aspeed-i2c-ic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-aspeed-scu-ic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-aspeed-vic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ath79-cpu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ath79-misc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ativic32.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-atmel-aic-common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-atmel-aic-common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-atmel-aic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-atmel-aic5.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-bcm2835.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-bcm2836.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-bcm6345-l1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-bcm7038-l1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-bcm7120-l2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-brcmstb-l2.c irqchip/irq-brcmstb-l2: Add write memory barrier before exit 2024-11-18 12:13:32 +01:00
irq-clps711x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-crossbar.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-csky-apb-intc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-csky-mpintc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-davinci-aintc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-davinci-cp-intc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-digicolor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-dw-apb-ictl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-eznps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ftintc010.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic-common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic-common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic-pm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic-realview.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic-v2m.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic-v3-its-fsl-mc-msi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic-v3-its-pci-msi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic-v3-its-platform-msi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic-v3-its.c irqchip/gic-v3-its: Prevent double free on error 2024-11-19 11:32:39 +01:00
irq-gic-v3-mbi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic-v3-vh.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic-v3.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic-v4.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-gic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-goldfish-pic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-hip04.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-i8259.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-imgpdc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-imx-gpcv2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-imx-intmux.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-imx-irqsteer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ingenic-tcu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ingenic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ixp4xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-jcore-aic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-keystone.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-loongson-htpic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-loongson-htvec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-loongson-liointc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-loongson-pch-msi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-loongson-pch-pic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-lpc32xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ls-extirq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ls-scfg-msi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ls1x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-madera.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mbigen.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-meson-gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mips-cpu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mips-gic.c irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable 2024-11-18 22:25:34 +01:00
irq-mmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mscc-ocelot.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mst-intc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mtk-cirq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mtk-sysirq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mvebu-gicp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mvebu-icu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mvebu-odmi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mvebu-pic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mvebu-sei.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-mxs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-nvic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-omap-intc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ompic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-or1k-pic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-orion.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-owl-sirq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-partition-percpu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-pic32-evic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-pruss-intc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-rda-intc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-renesas-h8s.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-renesas-h8300h.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-renesas-intc-irqpin.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-renesas-irqc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-renesas-rza1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-riscv-intc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-sa11x0.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-sifive-plic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-sirfsoc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-sl28cpld.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-sni-exiu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-st.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-stm32-exti.c irqchip/stm32-exti: add missing DT IRQ flag translation 2024-11-18 10:58:46 +01:00
irq-sun4i.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-sunxi-nmi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-tango.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-tb10x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-tegra.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ti-sci-inta.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ti-sci-intr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-ts4800.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-uniphier-aidet.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-versatile-fpga.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-vf610-mscm-ir.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-vic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-vt8500.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-xilinx-intc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-xtensa-mx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-xtensa-pic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq-zevio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irqchip.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-irq-combiner.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-pdc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spear-shirq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00