Skip to content

Commit

Permalink
sit: use kfree_skb to replace dev_kfree_skb
Browse files Browse the repository at this point in the history
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: Gao feng <gaofeng@cn.fujitsu.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Gao feng authored and David S. Miller committed Nov 28, 2013
1 parent cd3e22b commit 6602831
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
if (!new_skb) {
ip_rt_put(rt);
dev->stats.tx_dropped++;
dev_kfree_skb(skb);
kfree_skb(skb);
return NETDEV_TX_OK;
}
if (skb->sk)
Expand All @@ -977,7 +977,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
tx_error_icmp:
dst_link_failure(skb);
tx_error:
dev_kfree_skb(skb);
kfree_skb(skb);
out:
dev->stats.tx_errors++;
return NETDEV_TX_OK;
Expand Down Expand Up @@ -1017,7 +1017,7 @@ static netdev_tx_t sit_tunnel_xmit(struct sk_buff *skb,

tx_err:
dev->stats.tx_errors++;
dev_kfree_skb(skb);
kfree_skb(skb);
return NETDEV_TX_OK;

}
Expand Down

0 comments on commit 6602831

Please sign in to comment.