Commit 19125c1a authored by Martin Zhang's avatar Martin Zhang Committed by David S. Miller

net: use skb_clone to avoid alloc_pages failure.

1. new skb only need dst and ip address(v4 or v6).
2. skb_copy may need high order pages, which is very rare on long running server.
Signed-off-by: default avatarJunwei Zhang <linggao.zjw@alibaba-inc.com>
Signed-off-by: default avatarMartin Zhang <martinbj2008@gmail.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 90836b67
...@@ -857,7 +857,7 @@ static void neigh_probe(struct neighbour *neigh) ...@@ -857,7 +857,7 @@ static void neigh_probe(struct neighbour *neigh)
struct sk_buff *skb = skb_peek_tail(&neigh->arp_queue); struct sk_buff *skb = skb_peek_tail(&neigh->arp_queue);
/* keep skb alive even if arp_queue overflows */ /* keep skb alive even if arp_queue overflows */
if (skb) if (skb)
skb = skb_copy(skb, GFP_ATOMIC); skb = skb_clone(skb, GFP_ATOMIC);
write_unlock(&neigh->lock); write_unlock(&neigh->lock);
neigh->ops->solicit(neigh, skb); neigh->ops->solicit(neigh, skb);
atomic_inc(&neigh->probes); atomic_inc(&neigh->probes);
......
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