gro: fix truesize underestimation
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 13 Feb 2012 04:09:20 +0000 (04:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Feb 2012 21:04:39 +0000 (16:04 -0500)
skb_gro_receive() doesnt update truesize properly when adding one skb to
frag_list.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c

index da0c97f2fab446b551e79abd65bb485316ae53fe..f3a53078075395602368d3e5a50f1014fea6ae76 100644 (file)
@@ -2906,7 +2906,7 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
        nskb->prev = p;
 
        nskb->data_len += p->len;
-       nskb->truesize += p->len;
+       nskb->truesize += p->truesize;
        nskb->len += p->len;
 
        *head = nskb;
@@ -2916,6 +2916,7 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
        p = nskb;
 
 merge:
+       p->truesize += skb->truesize - len;
        if (offset > headlen) {
                unsigned int eat = offset - headlen;