[RHEL7,COMMIT] ms/net: use skb_clone to avoid alloc_pages failure.

Submitted by Konstantin Khorenko on April 9, 2019, 12:52 p.m.


Message ID 201904091252.x39Cqjf4006210@finist-ce7.sw.ru
State New
Series "ms/net: use skb_clone to avoid alloc_pages failure."
Headers show

Commit Message

Konstantin Khorenko April 9, 2019, 12:52 p.m.
The commit is pushed to "branch-rh7-3.10.0-957.10.1.vz7.85.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.10.1.vz7.85.16
commit 53236ee52b61ecfdc939d35c4284c7ccc779015a
Author: Martin Zhang <martinbj2008@gmail.com>
Date:   Tue Nov 17 20:49:30 2015 +0800

    ms/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>
    (cherry picked from commit 19125c1a4fd873421698876f34a06dbe18d25f17)
    Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
 net/core/neighbour.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 892363deb6df..7a0e4b420022 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -949,7 +949,7 @@  static void neigh_probe(struct neighbour *neigh)
 	struct sk_buff *skb = skb_peek(&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);
 	if (neigh->ops->solicit)
 		neigh->ops->solicit(neigh, skb);