Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

irqchip/gic: Correctly validate OF quirk descriptors

When checking for OF quirks, make sure either 'compatible' or 'property'
is set, and give up otherwise.

This avoids non-OF quirks being randomly applied as they don't have any
of the OF data that need checking.

Cc: Douglas Anderson <dianders@chromium.org>
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Fixes: 44bd78dd2b88 ("irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues")
Signed-off-by: Marc Zyngier <maz@kernel.org>

+2
+2
drivers/irqchip/irq-gic-common.c
··· 16 const struct gic_quirk *quirks, void *data) 17 { 18 for (; quirks->desc; quirks++) { 19 if (quirks->compatible && 20 !of_device_is_compatible(np, quirks->compatible)) 21 continue;
··· 16 const struct gic_quirk *quirks, void *data) 17 { 18 for (; quirks->desc; quirks++) { 19 + if (!quirks->compatible && !quirks->property) 20 + continue; 21 if (quirks->compatible && 22 !of_device_is_compatible(np, quirks->compatible)) 23 continue;