[patch 19/30] NET: Set truesize in pskb_copy
From: Chris Wright
Date: Wed Nov 15 2006 - 21:49:55 EST
-stable review patch. If anyone has any objections, please let us know.
------------------
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>
---
---
net/core/skbuff.c | 1 +
1 file changed, 1 insertion(+)
--- linux-2.6.18.2.orig/net/core/skbuff.c
+++ linux-2.6.18.2/net/core/skbuff.c
@@ -638,6 +638,7 @@ struct sk_buff *pskb_copy(struct sk_buff
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;
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/