Patch "irqchip/gic: Correctly validate OF quirk descriptors" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    irqchip/gic: Correctly validate OF quirk descriptors

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     irqchip-gic-correctly-validate-of-quirk-descriptors.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6cc65aa63e16fd980f9fe0f54795162e60f6cd1c
Author: Marc Zyngier <maz@xxxxxxxxxx>
Date:   Tue May 30 11:01:22 2023 +0100

    irqchip/gic: Correctly validate OF quirk descriptors
    
    [ Upstream commit 91539341a3b6e9c868024a4292455dae36e6f58c ]
    
    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@xxxxxxxxxxxx>
    Reported-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
    Tested-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
    Fixes: 44bd78dd2b88 ("irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues")
    Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/irqchip/irq-gic-common.c b/drivers/irqchip/irq-gic-common.c
index 02828a16979af..b8a10f2e72da7 100644
--- a/drivers/irqchip/irq-gic-common.c
+++ b/drivers/irqchip/irq-gic-common.c
@@ -29,6 +29,8 @@ void gic_enable_of_quirks(const struct device_node *np,
 			  const struct gic_quirk *quirks, void *data)
 {
 	for (; quirks->desc; quirks++) {
+		if (!quirks->compatible && !quirks->property)
+			continue;
 		if (quirks->compatible &&
 		    !of_device_is_compatible(np, quirks->compatible))
 			continue;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux