Patch "genirq/timings: Fix error return code in irq_timings_test_irqs()" has been added to the 5.14-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

    genirq/timings: Fix error return code in irq_timings_test_irqs()

to the 5.14-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:
     genirq-timings-fix-error-return-code-in-irq_timings_.patch
and it can be found in the queue-5.14 subdirectory.

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



commit 228273881c1c34cffaff94348c386857f82ac6f7
Author: Zhen Lei <thunder.leizhen@xxxxxxxxxx>
Date:   Wed Aug 11 17:33:32 2021 +0800

    genirq/timings: Fix error return code in irq_timings_test_irqs()
    
    [ Upstream commit 290fdc4b7ef14e33d0e30058042b0e9bfd02b89b ]
    
    Return a negative error code from the error handling case instead of 0, as
    done elsewhere in this function.
    
    Fixes: f52da98d900e ("genirq/timings: Add selftest for irqs circular buffer")
    Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
    Signed-off-by: Zhen Lei <thunder.leizhen@xxxxxxxxxx>
    Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210811093333.2376-1-thunder.leizhen@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/irq/timings.c b/kernel/irq/timings.c
index 4d2a702d7aa9..c43e2ac2f8de 100644
--- a/kernel/irq/timings.c
+++ b/kernel/irq/timings.c
@@ -799,12 +799,14 @@ static int __init irq_timings_test_irqs(struct timings_intervals *ti)
 
 		__irq_timings_store(irq, irqs, ti->intervals[i]);
 		if (irqs->circ_timings[i & IRQ_TIMINGS_MASK] != index) {
+			ret = -EBADSLT;
 			pr_err("Failed to store in the circular buffer\n");
 			goto out;
 		}
 	}
 
 	if (irqs->count != ti->count) {
+		ret = -ERANGE;
 		pr_err("Count differs\n");
 		goto out;
 	}



[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