Patch "net: mana: Fix memory leak in mana_gd_setup_irqs" has been added to the 6.12-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

    net: mana: Fix memory leak in mana_gd_setup_irqs

to the 6.12-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:
     net-mana-fix-memory-leak-in-mana_gd_setup_irqs.patch
and it can be found in the queue-6.12 subdirectory.

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



commit dfc3b53125f0eb4c7ecb841aefbbf834888a658e
Author: Maxim Levitsky <mlevitsk@xxxxxxxxxx>
Date:   Mon Dec 9 12:57:50 2024 -0500

    net: mana: Fix memory leak in mana_gd_setup_irqs
    
    [ Upstream commit bb1e3eb57d2cc38951f9a9f1b8c298ced175798f ]
    
    Commit 8afefc361209 ("net: mana: Assigning IRQ affinity on HT cores")
    added memory allocation in mana_gd_setup_irqs of 'irqs' but the code
    doesn't free this temporary array in the success path.
    
    This was caught by kmemleak.
    
    Fixes: 8afefc361209 ("net: mana: Assigning IRQ affinity on HT cores")
    Signed-off-by: Maxim Levitsky <mlevitsk@xxxxxxxxxx>
    Reviewed-by: Michal Swiatkowski <michal.swiatkowski@xxxxxxxxxxxxxxx>
    Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@xxxxxxxxxxxx>
    Reviewed-by: Saurabh Sengar <ssengar@xxxxxxxxxxxxxxxxxxx>
    Reviewed-by: Yury Norov <yury.norov@xxxxxxxxx>
    Link: https://patch.msgid.link/20241209175751.287738-2-mlevitsk@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
index ca4ed58f1206..42076c90ce87 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
@@ -1372,6 +1372,7 @@ static int mana_gd_setup_irqs(struct pci_dev *pdev)
 	gc->max_num_msix = nvec;
 	gc->num_msix_usable = nvec;
 	cpus_read_unlock();
+	kfree(irqs);
 	return 0;
 
 free_irq:




[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