Skip to content

Commit

Permalink
[NET]: Set truesize in pskb_copy
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Nov 7, 2006
1 parent 8e365ee commit 25f484a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,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;

Expand Down

0 comments on commit 25f484a

Please sign in to comment.