Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25f484a6 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller
Browse files

[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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8e365eec
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;