mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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@perches.com> Closes: https://lore.kernel.org/all/fc1bf93d92bb5b2f99c6c62745507cc22f3a7b2d.camel@perches.com/ Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20240708205826.5176-1-olek2@wp.pl Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit 1a2db00a554cfda57c397cce79b2804bf9633fec) Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
This commit is contained in:
parent
95139b5d59
commit
ae3b644b83
@ -221,9 +221,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]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user