net: ethernet: lantiq_etop: fix double free in detach
Subsystems (2)
PATCH v3 1/1 net: ethernet: lantiq_etop: fix double free in detach
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 <[email protected]>
Signed-off-by Aleksander Jan Bajkowski <[email protected]>
Reviewed-by Andrew Lunn <[email protected]>
--- drivers/net/ethernet/lantiq_etop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/lantiq_etop.c +2 -2
@@ -217,9 +217,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]); } }
Signature · 1 line
2.39.2
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Mon, 8 Jul 2024 22:58:26 +0200 you wrote:
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 <[email protected]>Signed-off-by Aleksander Jan Bajkowski <[email protected]>Reviewed-by Andrew Lunn <[email protected]>[...]
Here is the summary with links:
- [net,v3] net: ethernet: lantiq_etop: fix double free in detach
https://git.kernel.org/netdev/net/c/e1533b6319ab
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html