summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMartin Zhang <martinbj2008@gmail.com>2015-11-17 20:49:30 +0800
committerDavid S. Miller <davem@davemloft.net>2015-11-17 15:25:44 -0500
commit19125c1a4fd873421698876f34a06dbe18d25f17 (patch)
treecc8f92877c45f9876a6d602de42d094805bcc478 /net
parent90836b67e2171f48be696bdd3c4006d1e6f031fc (diff)
downloadlinux-stable-19125c1a4fd873421698876f34a06dbe18d25f17.tar.gz
linux-stable-19125c1a4fd873421698876f34a06dbe18d25f17.tar.bz2
linux-stable-19125c1a4fd873421698876f34a06dbe18d25f17.zip
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 <linggao.zjw@alibaba-inc.com> Signed-off-by: Martin Zhang <martinbj2008@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/neighbour.c2
1 files changed, 1 insertions, 1 deletions
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);