linux/drivers/irqchip
Maxime Chevallier 880799fc7a irqchip/irq-msi-lib: Check for NULL ops in msi_lib_irq_domain_select()
The irq_domain passed to msi_lib_irq_domain_select() may not have
msi_parent_ops set. There is a NULL pointer check for it, but unfortunately
there is a dereference of the parent ops pointer before that.

Move the NULL pointer test before the first use of that pointer.

This was found on a MacchiatoBin (Marvell Armada 8K SoC), which uses the
irq-mvebu-sei driver.

Fixes: 72e257c6f0 ("irqchip: Provide irq-msi-lib")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240823100733.1900666-1-maxime.chevallier@bootlin.com
Closes: https://lore.kernel.org/all/20240821165034.1af97bad@fedora-3.home/
2024-08-23 13:55:15 +02:00
..
alphascale_asm9260-icoll.h
exynos-combiner.c Merge branch irq/generic_handle_domain_irq-core into irq/irqchip-next 2021-06-11 14:32:12 +01:00
irq-al-fic.c irqchip/al-fic: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:50 -07:00
irq-alpine-msi.c irqchip/alpine-msi: Fix off-by-one in allocation error path 2024-04-09 11:03:15 +02:00
irq-apple-aic.c ARM: 2023-02-25 11:30:21 -08:00
irq-armada-370-xp.c irqchip/armada-370-xp: Add support for 32 MSI interrupts on non-IPI platforms 2024-06-23 17:23:08 +02:00
irq-aspeed-i2c-ic.c irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value 2022-05-04 16:37:48 +01:00
irq-aspeed-scu-ic.c irqchip/aspeed-scu-ic: Correctly initialise status and enable registers 2023-02-05 10:55:19 +00:00
irq-aspeed-vic.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00
irq-ath79-cpu.c
irq-ath79-misc.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-atmel-aic5.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00
irq-atmel-aic-common.c of: remove internal arguments from of_property_for_each_u32() 2024-07-25 06:53:47 -05:00
irq-atmel-aic-common.h
irq-atmel-aic.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00
irq-bcm2835.c irqchip/bcm2835: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND 2024-07-15 15:13:55 +02:00
irq-bcm2836.c irqchip: Use irq_domain_alloc_irqs() 2023-01-11 19:51:39 +01:00
irq-bcm6345-l1.c irqchip/irq-bcm6345-l1: Avoid explicit cpumask allocation on stack 2024-04-24 21:23:49 +02:00
irq-bcm7038-l1.c irqchip/irq-bcm7038-l1: Prefer struct_size over open coded arithmetic 2024-02-13 10:53:15 +01:00
irq-bcm7120-l2.c irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts 2023-02-18 14:23:41 +00:00
irq-brcmstb-l2.c irqchip/irq-brcmstb-l2: Avoid saving mask on shutdown 2024-04-24 21:11:48 +02:00
irq-clps711x.c irqchip/clps711x: Remove unused clps711x_intc_init() function 2023-06-17 07:21:08 +01:00
irq-crossbar.c
irq-csky-apb-intc.c irqchip: Use of_property_read_bool() for boolean properties 2023-04-08 11:07:49 +01:00
irq-csky-mpintc.c irqchip/csky-mpintc: Fixup mask/unmask implementation 2021-11-12 16:09:50 +00:00
irq-davinci-cp-intc.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00
irq-digicolor.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00
irq-dw-apb-ictl.c Revert "irqchip/dw-apb-ictl: Support building as module" 2024-06-25 21:30:48 +02:00
irq-ftintc010.c irqchip/ftintc010: Mark all function static 2023-06-17 07:20:52 +01:00
irq-gic-common.c irqchip/gic-v3: Make distributor priorities variables 2024-06-24 18:16:44 +01:00
irq-gic-common.h Switch ARM/ARM64 over to the modern per device MSI domains: 2024-07-22 14:02:19 -07:00
irq-gic-pm.c irqchip: Explicitly include correct DT includes 2023-08-21 17:49:11 +01:00
irq-gic-realview.c irqchip/gic/realview: Fix refcount leak in realview_gic_of_init 2022-06-09 17:36:57 +01:00
irq-gic-v2m.c irqchip/gic-v2m: Fix refcount leak in gicv2m_of_init() 2024-08-20 17:05:32 +02:00
irq-gic-v3-its-fsl-mc-msi.c irqchip: Explicitly include correct DT includes 2023-08-21 17:49:11 +01:00
irq-gic-v3-its-msi-parent.c irqchip/gic-v3-its: Correctly fish out the DID for platform MSI 2024-07-18 20:34:46 +02:00
irq-gic-v3-its.c irqchip/gic-v4: Fix ordering between vmapp and vpe locks 2024-08-20 16:57:13 +02:00
irq-gic-v3-mbi.c irqchip/gic_v3_mbi: Switch over to parent domain 2024-07-18 20:31:20 +02:00
irq-gic-v3.c irqchip/gic-v3: Init SRE before poking sysregs 2024-08-23 12:45:45 +02:00
irq-gic-v4.c sched.h: move pid helpers to pid.h 2023-12-20 19:26:31 -05:00
irq-gic.c irqchip/gic-v3: Make distributor priorities variables 2024-06-24 18:16:44 +01:00
irq-goldfish-pic.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-hip04.c irqchip/gic-v3: Make distributor priorities variables 2024-06-24 18:16:44 +01:00
irq-i8259.c irqchipr/i8259: Mark i8259_of_init() static 2023-08-21 17:40:30 +01:00
irq-idt3243x.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-imgpdc.c irqchip/imgpdc: Convert to platform_driver::remove_new() callback 2024-02-27 18:12:09 +01:00
irq-imx-gpcv2.c irqchip/irq-imx-gpcv2: Mark fwnode device as not initialized 2023-02-08 13:37:55 +01:00
irq-imx-intmux.c Updates for the MSI interrupt subsystem and RISC-V initial MSI support: 2024-03-11 14:03:03 -07:00
irq-imx-irqsteer.c irqchip/imx-irqsteer: Handle runtime power management correctly 2024-07-15 15:13:56 +02:00
irq-imx-mu-msi.c irqchip/imx-mu-msi: Switch to MSI parent 2024-07-18 20:31:20 +02:00
irq-ingenic-tcu.c irqchip/ingenic-tcu: Use correctly sized arguments for bit field 2021-12-16 15:19:52 +00:00
irq-ingenic.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-ixp4xx.c irq/gpio: ixp4xx: Drop boardfile probe path 2022-04-25 20:53:18 +02:00
irq-jcore-aic.c irqchip/jcore-aic: Fix missing allocation of IRQ descriptors 2023-06-17 07:54:48 +01:00
irq-keystone.c irqchip/keystone: Convert to platform_driver::remove_new() callback 2024-02-27 18:12:09 +01:00
irq-lan966x-oic.c irqchip: Add support for LAN966x OIC 2024-06-17 15:48:15 +02:00
irq-loongarch-cpu.c irqchip/loongarch-cpu: Fix return value of lpic_gsi_to_irq() 2024-07-26 21:08:42 +02:00
irq-loongson-eiointc.c Revert "Loongarch: Support loongarch avec" 2024-06-25 07:40:08 +02:00
irq-loongson-htpic.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-loongson-htvec.c irqchip: Explicitly include correct DT includes 2023-08-21 17:49:11 +01:00
irq-loongson-liointc.c irqchip/loongson-liointc: Set different ISRs for different cores 2024-06-23 17:09:26 +02:00
irq-loongson-pch-lpc.c irqchip/loongson-pch-lpc: Add suspend/resume support 2022-11-26 13:12:13 +00:00
irq-loongson-pch-msi.c Revert "Loongarch: Support loongarch avec" 2024-06-25 07:40:08 +02:00
irq-loongson-pch-pic.c irqchip/loongson-pch-pic: Update interrupt registration policy 2024-04-23 00:17:07 +02:00
irq-lpc32xx.c irqchip/lpc32xx: Switch to dynamic chip name output 2022-02-15 11:25:46 +00:00
irq-ls1x.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-ls-extirq.c irqchip/ls-extirq: Fix endianness detection 2022-12-05 10:39:52 +00:00
irq-ls-scfg-msi.c irqchip/ls-scfg-msi: Convert to platform_driver::remove_new() callback 2024-02-27 18:12:10 +01:00
irq-madera.c irqchip/madera: Convert to platform_driver::remove_new() callback 2024-02-27 18:12:10 +01:00
irq-mbigen.c irqchip/mbigen: Fix mbigen node address layout 2024-07-30 20:59:12 +02:00
irq-mchp-eic.c irqchip/mchp-eic: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:52 -07:00
irq-meson-gpio.c irqchip/meson-gpio: Convert meson_gpio_irq_controller::lock to 'raw_spinlock_t' 2024-07-29 15:43:50 +02:00
irq-mips-cpu.c irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry 2021-07-09 10:18:58 +01:00
irq-mips-gic.c irqchip/mips-gic: Mark gic_irq_domain_free() static 2023-08-21 17:40:20 +01:00
irq-mmp.c irqchip/mmp: Remove non-DT codepath 2023-06-17 07:21:02 +01:00
irq-mscc-ocelot.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-msi-lib.c irqchip/irq-msi-lib: Check for NULL ops in msi_lib_irq_domain_select() 2024-08-23 13:55:15 +02:00
irq-msi-lib.h irqchip/irq-msi-lib: Prepare for DEVICE MSI to replace platform MSI 2024-07-18 20:31:20 +02:00
irq-mst-intc.c irqchip/irq-mst: Support polarity configuration 2021-04-07 13:26:00 +01:00
irq-mtk-cirq.c irqchip/irq-mtk-cirq: Add support for System CIRQ on MT8192 2022-11-28 11:44:02 +00:00
irq-mtk-sysirq.c irqchip/mtk-sysirq: Skip setting irq-wake 2021-08-12 08:15:15 +01:00
irq-mvebu-gicp.c irqchip/mvebu-gicp: Switch to MSI parent 2024-07-18 20:31:20 +02:00
irq-mvebu-icu.c irqchip/irq-mvebu-icu: Remove platform MSI leftovers 2024-07-18 20:31:21 +02:00
irq-mvebu-odmi.c irqchip/mvebu-odmi: Switch to parent MSI 2024-07-18 20:31:21 +02:00
irq-mvebu-pic.c irqchip: Add missing MODULE_DESCRIPTION() macros 2024-06-23 17:23:08 +02:00
irq-mvebu-sei.c irqchip/irq-mvebu-sei: Switch to MSI parent 2024-07-18 20:31:21 +02:00
irq-mxs.c irqchip/mxs: Declare icoll_handle_irq() as static 2024-04-23 00:28:14 +02:00
irq-nvic.c ARM development updates for 5.18: 2022-03-23 17:35:57 -07:00
irq-omap-intc.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00
irq-ompic.c
irq-or1k-pic.c irqchip: or1k-pic: Undefine mask_ack for level triggered hardware 2022-06-28 17:31:15 +09:00
irq-orion.c irqchip/orion: Use of_address_count() helper 2023-08-21 17:48:59 +01:00
irq-owl-sirq.c irqchip: Add Actions Semi Owl SIRQ controller 2020-09-25 16:57:33 +01:00
irq-partition-percpu.c irqchip/partitions: Switch to bitmap_zalloc() 2021-07-26 18:01:27 +01:00
irq-pic32-evic.c A couple of fixes for interrupt chip drivers: 2024-08-04 08:36:57 -07:00
irq-pruss-intc.c irqchip/pruss-intc: Convert to platform_driver::remove_new() callback 2024-02-27 18:12:10 +01:00
irq-qcom-mpm.c irqchip/qcom-mpm: Fix IS_ERR() vs NULL check in qcom_mpm_init() 2024-02-13 10:26:15 +01:00
irq-rda-intc.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00
irq-realtek-rtl.c irqchip/realtek-rtl: use parent interrupts 2022-09-28 14:17:10 +01:00
irq-renesas-intc-irqpin.c irqchip/renesas-intc-irqpin: Convert to platform_driver::remove_new() callback 2024-02-27 18:12:10 +01:00
irq-renesas-irqc.c irqchip/renesas-irqc: Convert to platform_driver::remove_new() callback 2024-02-27 18:12:10 +01:00
irq-renesas-rza1.c irqchip/renesas-rza1: Convert to platform_driver::remove_new() callback 2024-02-27 18:12:10 +01:00
irq-renesas-rzg2l.c irqchip/renesas-rzg2l: Reorder function calls in rzg2l_irqc_irq_disable() 2024-06-23 17:23:08 +02:00
irq-riscv-aplic-direct.c irqchip/riscv-aplic-direct: Avoid explicit cpumask allocation on stack 2024-04-24 21:23:49 +02:00
irq-riscv-aplic-main.c irqchip/riscv-aplic: Fix an IS_ERR() vs NULL bug in probe() 2024-08-20 17:05:32 +02:00
irq-riscv-aplic-main.h irqchip/riscv-aplic: Add support for MSI-mode 2024-03-25 17:38:29 +01:00
irq-riscv-aplic-msi.c irqchip/riscv-aplic: Retrigger MSI interrupt on source configuration 2024-08-10 10:42:04 +02:00
irq-riscv-imsic-early.c irqchip: riscv-imsic: Fixup riscv_ipi_set_virq_range() conflict 2024-05-23 04:48:40 -07:00
irq-riscv-imsic-platform.c irqchip/riscv-imsic: Fix boot time update effective affinity warning 2024-04-14 13:28:49 +02:00
irq-riscv-imsic-state.c irqchip: Add RISC-V incoming MSI controller early driver 2024-03-25 17:38:28 +01:00
irq-riscv-imsic-state.h irqchip/riscv-imsic: Add device MSI domain support for platform devices 2024-03-25 17:38:28 +01:00
irq-riscv-intc.c Updates for the interrupt subsystem: 2024-07-22 13:52:05 -07:00
irq-sa11x0.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00
irq-sifive-plic.c irqchip/sifive-plic: Probe plic driver early for Allwinner D1 platform 2024-08-20 16:45:20 +02:00
irq-sl28cpld.c irqchip/irq-sl28cpld: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:53 -07:00
irq-sni-exiu.c irqchip/exiu: Fix acknowledgment of edge triggered interrupts 2022-05-04 16:33:17 +01:00
irq-sp7021-intc.c irqchip: Add Sunplus SP7021 interrupt controller driver 2022-07-08 14:23:57 +02:00
irq-st.c irqchip: Explicitly include correct DT includes 2023-08-21 17:49:11 +01:00
irq-starfive-jh8100-intc.c irqchip: Add StarFive external interrupt controller 2024-02-26 15:09:18 +01:00
irq-stm32-exti.c irqchip/stm32-exti: Split MCU and MPU code 2024-06-23 19:49:45 +02:00
irq-stm32mp-exti.c irqchip/stm32mp-exti: Allow building as module 2024-06-24 00:16:43 +02:00
irq-sun4i.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00
irq-sun6i-r.c minmax: don't use max() in situations that want a C constant expression 2024-07-28 20:23:27 -07:00
irq-sunxi-nmi.c irqchip: Remove redundant irq_chip::name initialization 2024-03-25 17:38:29 +01:00
irq-tb10x.c irqchip: Remove redundant irq_chip::name initialization 2024-03-25 17:38:29 +01:00
irq-tegra.c irqchip/tegra: Fix overflow implicit truncation warnings 2022-06-15 17:41:11 +02:00
irq-ti-sci-inta.c irqchip: Explicitly include correct DT includes 2023-08-21 17:49:11 +01:00
irq-ti-sci-intr.c irqchip: Explicitly include correct DT includes 2023-08-21 17:49:11 +01:00
irq-ts4800.c irqchip: Add missing MODULE_DESCRIPTION() macros 2024-06-23 17:23:08 +02:00
irq-uniphier-aidet.c irqchip: Explicitly include correct DT includes 2023-08-21 17:49:11 +01:00
irq-versatile-fpga.c irqchip: irq-versatile-fpga: remove obsolete oxnas compatible 2023-08-14 10:26:56 +02:00
irq-vf610-mscm-ir.c
irq-vic.c irqchip/vic: Fix a kernel-doc warning 2024-02-21 18:31:08 +01:00
irq-vt8500.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00
irq-wpcm450-aic.c irqchip/wpcm450: Fix memory leak in wpcm450_aic_of_init() 2022-11-26 13:29:48 +00:00
irq-xilinx-intc.c irqchip/xilinx: Fix shift out of bounds 2024-08-10 10:39:24 +02:00
irq-xtensa-mx.c irqchip: irq-xtensa-mx: include header for missing prototype 2023-09-20 05:03:20 -07:00
irq-xtensa-pic.c irqchip/irq-xtensa-pic: Clean up 2023-12-12 15:45:39 +01:00
irq-zevio.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00
irqchip.c irqchip: Explicitly include correct DT includes 2023-08-21 17:49:11 +01:00
Kconfig Switch ARM/ARM64 over to the modern per device MSI domains: 2024-07-22 14:02:19 -07:00
Makefile Switch ARM/ARM64 over to the modern per device MSI domains: 2024-07-22 14:02:19 -07:00
qcom-irq-combiner.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
qcom-pdc.c irqchip/qcom-pdc: Add support for v3.2 HW 2023-09-12 13:38:08 +01:00
spear-shirq.c irqchip/spear-shirq: Add support for IRQ 0..6 2021-12-16 13:29:44 +00:00