Commit 66028310 authored by Gao feng's avatar Gao feng Committed by David S. Miller

sit: use kfree_skb to replace dev_kfree_skb

In failure case, we should use kfree_skb not
dev_kfree_skb to free skbuff, dev_kfree_skb
is defined as consume_skb.

Trace takes advantage of this point.
Signed-off-by: default avatarGao feng <gaofeng@cn.fujitsu.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cd3e22b7
...@@ -951,7 +951,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb, ...@@ -951,7 +951,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
if (!new_skb) { if (!new_skb) {
ip_rt_put(rt); ip_rt_put(rt);
dev->stats.tx_dropped++; dev->stats.tx_dropped++;
dev_kfree_skb(skb); kfree_skb(skb);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
if (skb->sk) if (skb->sk)
...@@ -977,7 +977,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb, ...@@ -977,7 +977,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
tx_error_icmp: tx_error_icmp:
dst_link_failure(skb); dst_link_failure(skb);
tx_error: tx_error:
dev_kfree_skb(skb); kfree_skb(skb);
out: out:
dev->stats.tx_errors++; dev->stats.tx_errors++;
return NETDEV_TX_OK; return NETDEV_TX_OK;
...@@ -1017,7 +1017,7 @@ static netdev_tx_t sit_tunnel_xmit(struct sk_buff *skb, ...@@ -1017,7 +1017,7 @@ static netdev_tx_t sit_tunnel_xmit(struct sk_buff *skb,
tx_err: tx_err:
dev->stats.tx_errors++; dev->stats.tx_errors++;
dev_kfree_skb(skb); kfree_skb(skb);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment