Commit 0c772159 authored by Sridhar Samudrala's avatar Sridhar Samudrala Committed by David S. Miller

net: Use consume_skb() to free gso segmented skb

Use consume_skb() to free the original skb that is successfully transmitted
as gso segmented skbs so that it is not treated as a drop due to an error.
Signed-off-by: default avatarSridhar Samudrala <sri@us.ibm.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ab137bc
......@@ -2565,8 +2565,11 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
} while (skb->next);
out_kfree_gso_skb:
if (likely(skb->next == NULL))
if (likely(skb->next == NULL)) {
skb->destructor = DEV_GSO_CB(skb)->destructor;
consume_skb(skb);
return rc;
}
out_kfree_skb:
kfree_skb(skb);
out:
......
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