From: Herbert Xu Date: Thu, 9 Nov 2006 10:03:56 +0000 (+0100) Subject: [NET]: Set truesize in pskb_copy X-Git-Tag: v2.6.16.32-rc1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f61e927c7c47e696f7fe18ae3e7ea32a42e1d24;p=thirdparty%2Fkernel%2Fstable.git [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 Signed-off-by: David S. Miller Signed-off-by: Adrian Bunk --- diff --git a/net/core/skbuff.c b/net/core/skbuff.c index c0029f93899d9..09efe62fe0174 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -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;