Skip to content

Commit

Permalink
net: use skb_clone to avoid alloc_pages failure.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Martin Zhang <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
martinbj2008 authored and davem330 committed Nov 17, 2015
1 parent 90836b6 commit 19125c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 19125c1

Please sign in to comment.