Skip to content

Commit

Permalink
net: Use consume_skb() to free gso segmented skb
Browse files Browse the repository at this point in the history
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: Sridhar Samudrala <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Sridhar Samudrala authored and davem330 committed Apr 30, 2013
1 parent 1ab137b commit 0c77215
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0c77215

Please sign in to comment.