From: Ben Hutchings Date: Thu, 16 Apr 2009 08:04:20 +0000 (+0000) Subject: net: Fix GRO for multiple page fragments X-Git-Tag: v3.0~9075^2~142 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5db8765a86a4cbaf45adaf8c231cf9a6ca2dcfaf;p=platform%2Fkernel%2Flinux-amlogic.git net: Fix GRO for multiple page fragments This loop over fragments in napi_fraginfo_skb() was "interesting". Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index 001a4c5..308a7d0 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2545,9 +2545,9 @@ struct sk_buff *napi_fraginfo_skb(struct napi_struct *napi, } BUG_ON(info->nr_frags > MAX_SKB_FRAGS); - frag = &info->frags[info->nr_frags - 1]; + frag = info->frags; - for (i = skb_shinfo(skb)->nr_frags; i < info->nr_frags; i++) { + for (i = 0; i < info->nr_frags; i++) { skb_fill_page_desc(skb, i, frag->page, frag->page_offset, frag->size); frag++;