aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-11-08 22:33:56 -0800
committerChris Wright <chrisw@sous-sol.org>2006-11-18 19:28:03 -0800
commit37ccc3f978bc86c131eea70d7a5afb29b2ca3404 (patch)
treeeadb872421304bbaf1e89d45640527966f794a4f
parentb2d4f8d42c3ab6360dde290fc184182d5e371911 (diff)
[PATCH] NET: Set truesize in pskb_copy
Since pskb_copy tacks on the non-linear bits from the original skb, it needs to count them in the truesize field of the new skb. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-rw-r--r--net/core/skbuff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 7de98574e39c..4ae562fbe531 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -638,6 +638,7 @@ struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask)
n->csum = skb->csum;
n->ip_summed = skb->ip_summed;
+ n->truesize += skb->data_len;
n->data_len = skb->data_len;
n->len = skb->len;