Patch "irqchip/alpine-msi: Fix off-by-one in allocation error path" has been added to the 6.6-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/alpine-msi: Fix off-by-one in allocation error path

to the 6.6-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-alpine-msi-fix-off-by-one-in-allocation-erro.patch
and it can be found in the queue-6.6 subdirectory.

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



commit d83f9e0797c7bddd298d22e4417e15c6bf11d5cc
Author: Zenghui Yu <yuzenghui@xxxxxxxxxx>
Date:   Wed Mar 27 22:23:05 2024 +0800

    irqchip/alpine-msi: Fix off-by-one in allocation error path
    
    [ Upstream commit ff3669a71afa06208de58d6bea1cc49d5e3fcbd1 ]
    
    When alpine_msix_gic_domain_alloc() fails, there is an off-by-one in the
    number of interrupts to be freed.
    
    Fix it by passing the number of successfully allocated interrupts, instead
    of the relative index of the last allocated one.
    
    Fixes: 3841245e8498 ("irqchip/alpine-msi: Fix freeing of interrupts on allocation error path")
    Signed-off-by: Zenghui Yu <yuzenghui@xxxxxxxxxx>
    Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240327142305.1048-1-yuzenghui@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c
index 9c8b1349ee17b..a1430ab60a8a3 100644
--- a/drivers/irqchip/irq-alpine-msi.c
+++ b/drivers/irqchip/irq-alpine-msi.c
@@ -165,7 +165,7 @@ static int alpine_msix_middle_domain_alloc(struct irq_domain *domain,
 	return 0;
 
 err_sgi:
-	irq_domain_free_irqs_parent(domain, virq, i - 1);
+	irq_domain_free_irqs_parent(domain, virq, i);
 	alpine_msix_free_sgi(priv, sgi, nr_irqs);
 	return err;
 }




[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