]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY
authorZhang Changzhong <zhangchangzhong@huawei.com>
Fri, 21 Oct 2022 01:32:24 +0000 (09:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Oct 2022 12:02:18 +0000 (13:02 +0100)
The ndo_start_xmit() method must not free skb when returning
NETDEV_TX_BUSY, since caller is going to requeue freed skb.

Fixes: 8bac39e93a5a ("MIPS: Lantiq: Add ethernet driver")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/lantiq_etop.c

index 59aab4086dcce3d1426438bd0683fc9ac26f14c3..f5961bdcc4809675ab4695e204e4c5994cc42176 100644 (file)
@@ -485,7 +485,6 @@ ltq_etop_tx(struct sk_buff *skb, struct net_device *dev)
        len = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len;
 
        if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) || ch->skb[ch->dma.desc]) {
-               dev_kfree_skb_any(skb);
                netdev_err(dev, "tx ring full\n");
                netif_tx_stop_queue(txq);
                return NETDEV_TX_BUSY;