projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e365ee
)
[NET]: Set truesize in pskb_copy
author
Herbert Xu
<herbert@gondor.apana.org.au>
Tue, 7 Nov 2006 22:57:15 +0000
(14:57 -0800)
committer
David S. Miller
<davem@sunset.davemloft.net>
Tue, 7 Nov 2006 23:10:14 +0000
(15:10 -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>
net/core/skbuff.c
patch
|
blob
|
history
diff --git
a/net/core/skbuff.c
b/net/core/skbuff.c
index f735455dc5d178c2d61f001e007e03fe8a86b5e4..b8b106358040e16da07b0a78794193035525b161 100644
(file)
--- a/
net/core/skbuff.c
+++ b/
net/core/skbuff.c
@@
-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;