Message ID | 20210409180605.78599-4-mcroce@linux.microsoft.com |
---|---|
State | New |
Headers | show |
Series | [net-next,1/3] skbuff: add helper to walk over the fraglist | expand |
diff --git a/net/core/dev.c b/net/core/dev.c index 33ff4a944109..98deb4852151 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3505,7 +3505,7 @@ static int illegal_highdma(struct net_device *dev, struct sk_buff *skb) int i; if (!(dev->features & NETIF_F_HIGHDMA)) { - for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { + skb_for_each_frag(skb, i) { skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; if (PageHighMem(skb_frag_page(frag)))