Patch "net: ethernet: lantiq_etop: fix double free in detach" 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

    net: ethernet: lantiq_etop: fix double free in detach

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:
     net-ethernet-lantiq_etop-fix-double-free-in-detach.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 4a356ae8eee577231494d97320f336fed42309fa
Author: Aleksander Jan Bajkowski <olek2@xxxxx>
Date:   Mon Jul 8 22:58:26 2024 +0200

    net: ethernet: lantiq_etop: fix double free in detach
    
    [ Upstream commit e1533b6319ab9c3a97dad314dd88b3783bc41b69 ]
    
    The number of the currently released descriptor is never incremented
    which results in the same skb being released multiple times.
    
    Fixes: 504d4721ee8e ("MIPS: Lantiq: Add ethernet driver")
    Reported-by: Joe Perches <joe@xxxxxxxxxxx>
    Closes: https://lore.kernel.org/all/fc1bf93d92bb5b2f99c6c62745507cc22f3a7b2d.camel@xxxxxxxxxxx/
    Signed-off-by: Aleksander Jan Bajkowski <olek2@xxxxx>
    Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
    Link: https://patch.msgid.link/20240708205826.5176-1-olek2@xxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 62300d46d9186..1d7c0b872c594 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -213,9 +213,9 @@ ltq_etop_free_channel(struct net_device *dev, struct ltq_etop_chan *ch)
 	if (ch->dma.irq)
 		free_irq(ch->dma.irq, priv);
 	if (IS_RX(ch->idx)) {
-		int desc;
+		struct ltq_dma_channel *dma = &ch->dma;
 
-		for (desc = 0; desc < LTQ_DESC_NUM; desc++)
+		for (dma->desc = 0; dma->desc < LTQ_DESC_NUM; dma->desc++)
 			dev_kfree_skb_any(ch->skb[ch->dma.desc]);
 	}
 }




[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