Commit 5db8765a authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

net: Fix GRO for multiple page fragments

This loop over fragments in napi_fraginfo_skb() was "interesting".
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9a5120dd
...@@ -2545,9 +2545,9 @@ struct sk_buff *napi_fraginfo_skb(struct napi_struct *napi, ...@@ -2545,9 +2545,9 @@ struct sk_buff *napi_fraginfo_skb(struct napi_struct *napi,
} }
BUG_ON(info->nr_frags > MAX_SKB_FRAGS); 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, skb_fill_page_desc(skb, i, frag->page, frag->page_offset,
frag->size); frag->size);
frag++; frag++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment