Patchwork [net-next] ppp: fix truesize underestimation

login
register
mail settings
Submitter Eric Dumazet
Date Feb. 13, 2012, 2:23 p.m.
Message ID <1329143004.2494.14.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Download mbox | patch
Permalink /patch/140909/
State Accepted
Delegated to: David Miller
Headers show

Comments

Eric Dumazet - Feb. 13, 2012, 2:23 p.m.
When building frag_list, head truesize should be sum of all frag
truesize.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 drivers/net/ppp/ppp_generic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Feb. 13, 2012, 9:05 p.m.
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 13 Feb 2012 15:23:24 +0100

> When building frag_list, head truesize should be sum of all frag
> truesize.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index edfa15d..93a8639 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -2113,7 +2113,7 @@  ppp_mp_reconstruct(struct ppp *ppp)
 
 				skb->len += p->len;
 				skb->data_len += p->len;
-				skb->truesize += p->len;
+				skb->truesize += p->truesize;
 
 				if (p == tail)
 					break;