diff options
author | Sridhar Samudrala <sri@us.ibm.com> | 2013-04-29 09:02:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-30 00:18:13 -0400 |
commit | 0c772159d1ae15c664304f0830c9aec4702593da (patch) | |
tree | 964dfe8cd600f518a83325e56f1f60390df8a293 /net/core | |
parent | 1ab137bc99138dd0d459655642bee16afec8b7ce (diff) |
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: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 7c30dcecee1d..4040673f806a 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2565,8 +2565,11 @@ gso: | |||
2565 | } while (skb->next); | 2565 | } while (skb->next); |
2566 | 2566 | ||
2567 | out_kfree_gso_skb: | 2567 | out_kfree_gso_skb: |
2568 | if (likely(skb->next == NULL)) | 2568 | if (likely(skb->next == NULL)) { |
2569 | skb->destructor = DEV_GSO_CB(skb)->destructor; | 2569 | skb->destructor = DEV_GSO_CB(skb)->destructor; |
2570 | consume_skb(skb); | ||
2571 | return rc; | ||
2572 | } | ||
2570 | out_kfree_skb: | 2573 | out_kfree_skb: |
2571 | kfree_skb(skb); | 2574 | kfree_skb(skb); |
2572 | out: | 2575 | out: |