From: Eric Dumazet Date: Thu, 13 Oct 2011 21:12:46 +0000 (-0400) Subject: sky2: fix skb truesize underestimation X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7ae60b3f3b297b7f04025c93f1cb2275c3a1dfcd;p=openwrt%2Fstaging%2Fblogic.git sky2: fix skb truesize underestimation sky2 allocates a page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 6895e3be260c..92634907bf8d 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c @@ -2486,7 +2486,7 @@ static void skb_put_frags(struct sk_buff *skb, unsigned int hdr_space, frag->size = size; skb->data_len += size; - skb->truesize += size; + skb->truesize += PAGE_SIZE; skb->len += size; length -= size; }