net:ethernet:cadence: Replace dev_kfree_skb_any by dev_consume_skb_any
authorHuang Zijiang <huang.zijiang@zte.com.cn>
Thu, 14 Feb 2019 06:41:18 +0000 (14:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2019 17:26:26 +0000 (12:26 -0500)
The skb should be freed by dev_consume_skb_any() in macb_pad_and_fcs()
when *skb is still used. The *skb is be replaced by nskb, so the
original *skb should be consumed(not drop).

Signed-off-by: Huang Zijiang <huang.zijiang@zte.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb_main.c

index 0d6288dd609a3b055ee300789e44cd6d4a1cdd4b..f2915f2fe21ae27dfe36870725e04e9a548cab58 100644 (file)
@@ -1734,7 +1734,7 @@ static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev)
                if (!nskb)
                        return -ENOMEM;
 
-               dev_kfree_skb_any(*skb);
+               dev_consume_skb_any(*skb);
                *skb = nskb;
        }