Patch "sh: check return code of request_irq" has been added to the 5.4-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

    sh: check return code of request_irq

to the 5.4-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:
     sh-check-return-code-of-request_irq.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 02810049c573055c92034242ea63012478b8fd12
Author: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
Date:   Tue Dec 22 12:54:01 2020 -0800

    sh: check return code of request_irq
    
    [ Upstream commit 0e38225c92c7964482a8bb6b3e37fde4319e965c ]
    
    request_irq is marked __must_check, but the call in shx3_prepare_cpus
    has a void return type, so it can't propagate failure to the caller.
    Follow cues from hexagon and just print an error.
    
    Fixes: c7936b9abcf5 ("sh: smp: Hook in to the generic IPI handler for SH-X3 SMP.")
    Cc: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>
    Cc: Paul Mundt <lethal@xxxxxxxxxxxx>
    Reported-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Signed-off-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
    Tested-by: John Paul Adrian Glaubitz <glaubitz@xxxxxxxxxxxxxxxxxxx>
    Reviewed-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
    Signed-off-by: Rich Felker <dalias@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
index f8a2bec0f260b..1261dc7b84e8b 100644
--- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
@@ -73,8 +73,9 @@ static void shx3_prepare_cpus(unsigned int max_cpus)
 	BUILD_BUG_ON(SMP_MSG_NR >= 8);
 
 	for (i = 0; i < SMP_MSG_NR; i++)
-		request_irq(104 + i, ipi_interrupt_handler,
-			    IRQF_PERCPU, "IPI", (void *)(long)i);
+		if (request_irq(104 + i, ipi_interrupt_handler,
+			    IRQF_PERCPU, "IPI", (void *)(long)i))
+			pr_err("Failed to request irq %d\n", i);
 
 	for (i = 0; i < max_cpus; i++)
 		set_cpu_present(i, true);



[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