lkml.org 
[lkml]   [2006]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 19/30] NET: Set truesize in pskb_copy
-stable review patch.  If anyone has any objections, please let us know.
------------------

From: Herbert Xu <herbert@gondor.apana.org.au>

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>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---

---
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-11-16 03:57    [W:0.433 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site