linux/drivers/irqchip
Hagar Hemdan b97e8a2f71 irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update()
its_vlpi_prop_update() calls lpi_write_config() which obtains the
mapping information for a VLPI without lock held. So it could race
with its_vlpi_unmap().

Since all calls from its_irq_set_vcpu_affinity() require the same
lock to be held, hoist the locking there instead of sprinkling the
locking all over the place.

This bug was discovered using Coverity Static Analysis Security Testing
(SAST) by Synopsys, Inc.

[ tglx: Use guard() instead of goto ]

Fixes: 015ec0386a ("irqchip/gic-v3-its: Add VLPI configuration handling")
Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Hagar Hemdan <hagarhem@amazon.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240531162144.28650-1-hagarhem@amazon.com
2024-06-03 18:20:00 +02:00
..
alphascale_asm9260-icoll.h
exynos-combiner.c
irq-al-fic.c
irq-alpine-msi.c
irq-apple-aic.c
irq-armada-370-xp.c
irq-aspeed-i2c-ic.c
irq-aspeed-scu-ic.c
irq-aspeed-vic.c
irq-ath79-cpu.c
irq-ath79-misc.c
irq-atmel-aic-common.c
irq-atmel-aic-common.h
irq-atmel-aic.c
irq-atmel-aic5.c
irq-bcm2835.c
irq-bcm2836.c
irq-bcm6345-l1.c
irq-bcm7038-l1.c
irq-bcm7120-l2.c
irq-brcmstb-l2.c
irq-clps711x.c
irq-crossbar.c
irq-csky-apb-intc.c
irq-csky-mpintc.c
irq-davinci-cp-intc.c
irq-digicolor.c
irq-dw-apb-ictl.c
irq-ftintc010.c
irq-gic-common.c
irq-gic-common.h
irq-gic-pm.c
irq-gic-realview.c
irq-gic-v2m.c
irq-gic-v3-its-fsl-mc-msi.c
irq-gic-v3-its-pci-msi.c
irq-gic-v3-its-platform-msi.c
irq-gic-v3-its.c irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update() 2024-06-03 18:20:00 +02:00
irq-gic-v3-mbi.c
irq-gic-v3.c
irq-gic-v4.c
irq-gic.c
irq-goldfish-pic.c
irq-hip04.c
irq-i8259.c
irq-idt3243x.c
irq-imgpdc.c
irq-imx-gpcv2.c
irq-imx-intmux.c
irq-imx-irqsteer.c
irq-imx-mu-msi.c
irq-ingenic-tcu.c
irq-ingenic.c
irq-ixp4xx.c
irq-jcore-aic.c
irq-keystone.c
irq-loongarch-cpu.c
irq-loongson-eiointc.c
irq-loongson-htpic.c
irq-loongson-htvec.c
irq-loongson-liointc.c
irq-loongson-pch-lpc.c
irq-loongson-pch-msi.c
irq-loongson-pch-pic.c
irq-lpc32xx.c
irq-ls-extirq.c
irq-ls-scfg-msi.c
irq-ls1x.c
irq-madera.c
irq-mbigen.c
irq-mchp-eic.c
irq-meson-gpio.c
irq-mips-cpu.c
irq-mips-gic.c
irq-mmp.c
irq-mscc-ocelot.c
irq-mst-intc.c
irq-mtk-cirq.c
irq-mtk-sysirq.c
irq-mvebu-gicp.c
irq-mvebu-icu.c
irq-mvebu-odmi.c
irq-mvebu-pic.c
irq-mvebu-sei.c
irq-mxs.c
irq-nvic.c
irq-omap-intc.c
irq-ompic.c
irq-or1k-pic.c
irq-orion.c
irq-owl-sirq.c
irq-partition-percpu.c
irq-pic32-evic.c
irq-pruss-intc.c
irq-qcom-mpm.c
irq-rda-intc.c
irq-realtek-rtl.c
irq-renesas-intc-irqpin.c
irq-renesas-irqc.c
irq-renesas-rza1.c
irq-renesas-rzg2l.c
irq-riscv-aplic-direct.c
irq-riscv-aplic-main.c
irq-riscv-aplic-main.h
irq-riscv-aplic-msi.c
irq-riscv-imsic-early.c
irq-riscv-imsic-platform.c
irq-riscv-imsic-state.c
irq-riscv-imsic-state.h
irq-riscv-intc.c
irq-sa11x0.c
irq-sifive-plic.c irqchip/sifive-plic: Chain to parent IRQ after handlers are ready 2024-06-03 13:53:12 +02:00
irq-sl28cpld.c
irq-sni-exiu.c
irq-sp7021-intc.c
irq-st.c
irq-starfive-jh8100-intc.c
irq-stm32-exti.c
irq-sun4i.c
irq-sun6i-r.c
irq-sunxi-nmi.c
irq-tb10x.c
irq-tegra.c
irq-ti-sci-inta.c
irq-ti-sci-intr.c
irq-ts4800.c
irq-uniphier-aidet.c
irq-versatile-fpga.c
irq-vf610-mscm-ir.c
irq-vic.c
irq-vt8500.c
irq-wpcm450-aic.c
irq-xilinx-intc.c
irq-xtensa-mx.c
irq-xtensa-pic.c
irq-zevio.c
irqchip.c
Kconfig
Makefile
qcom-irq-combiner.c
qcom-pdc.c
spear-shirq.c