]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] NET: Set truesize in pskb_copy
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Nov 2006 06:33:56 +0000 (22:33 -0800)
committerChris Wright <chrisw@sous-sol.org>
Sun, 19 Nov 2006 03:28:03 +0000 (19:28 -0800)
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>
net/core/skbuff.c

index 7de98574e39c2a124c66611386ee913428cd94b9..4ae562fbe5312516e32e9cb6b353853479db89d2 100644 (file)
@@ -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;