aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-11-07 17:57:15 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-11-07 18:10:14 -0500
commit25f484a62e41be8020b9a31bf50a792baa58d2d4 (patch)
treed8323930780d38c8c66d0ebc80b36c6c14d56824 /net/core
parent8e365eec04c86899fab5db0f49a9c98554069bd0 (diff)
[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>
Diffstat (limited to 'net/core')
-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 f735455dc5d1..b8b106358040 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -639,6 +639,7 @@ struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask)
639 n->csum = skb->csum; 639 n->csum = skb->csum;
640 n->ip_summed = skb->ip_summed; 640 n->ip_summed = skb->ip_summed;
641 641
642 n->truesize += skb->data_len;
642 n->data_len = skb->data_len; 643 n->data_len = skb->data_len;
643 n->len = skb->len; 644 n->len = skb->len;
644 645