From: Martin Zhang Date: Tue, 17 Nov 2015 12:49:30 +0000 (+0800) Subject: net: use skb_clone to avoid alloc_pages failure. X-Git-Tag: microblaze-4.7-rc1~1004^2~4 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=19125c1a4fd873421698876f34a06dbe18d25f17;p=linux-2.6-microblaze.git 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: Junwei Zhang Signed-off-by: Martin Zhang Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 1aa8437ed6c4..e6af42da28d9 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -857,7 +857,7 @@ static void neigh_probe(struct neighbour *neigh) struct sk_buff *skb = skb_peek_tail(&neigh->arp_queue); /* keep skb alive even if arp_queue overflows */ if (skb) - skb = skb_copy(skb, GFP_ATOMIC); + skb = skb_clone(skb, GFP_ATOMIC); write_unlock(&neigh->lock); neigh->ops->solicit(neigh, skb); atomic_inc(&neigh->probes);