]> git.hungrycats.org Git - linux/commitdiff
[NET]: Set truesize in pskb_copy
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Nov 2006 10:03:56 +0000 (11:03 +0100)
committerAdrian Bunk <bunk@stusta.de>
Thu, 9 Nov 2006 10:03:56 +0000 (11:03 +0100)
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: Adrian Bunk <bunk@stusta.de>
net/core/skbuff.c

index c0029f93899d9a6b03b362761e8bbd3675a106dc..09efe62fe017499801e913dcab5d63cd8d759102 100644 (file)
@@ -582,6 +582,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;