提交 25f484a6 编写于 作者: H Herbert Xu 提交者: David S. Miller

[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: NHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8e365eec
...@@ -639,6 +639,7 @@ struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask) ...@@ -639,6 +639,7 @@ struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask)
n->csum = skb->csum; n->csum = skb->csum;
n->ip_summed = skb->ip_summed; n->ip_summed = skb->ip_summed;
n->truesize += skb->data_len;
n->data_len = skb->data_len; n->data_len = skb->data_len;
n->len = skb->len; n->len = skb->len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册