sfc: Replace dev_kfree_skb_any by dev_consume_skb_any
authorHuang Zijiang <huang.zijiang@zte.com.cn>
Thu, 14 Feb 2019 06:42:13 +0000 (14:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2019 17:26:50 +0000 (12:26 -0500)
The skb should be freed by dev_consume_skb_any() in efx_tx_tso_fallback()
when skb is still used. The skb will be replaced by segments, so the
original skb should be consumed(not drop).

Signed-off-by: Huang Zijiang <huang.zijiang@zte.com.cn>
Acked-by: Bert Kenward <bkenward@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/tx.c

index 22eb059..06c8f28 100644 (file)
@@ -471,7 +471,7 @@ static int efx_tx_tso_fallback(struct efx_tx_queue *tx_queue,
        if (IS_ERR(segments))
                return PTR_ERR(segments);
 
-       dev_kfree_skb_any(skb);
+       dev_consume_skb_any(skb);
        skb = segments;
 
        while (skb) {