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

Konstantin Khorenko khorenko at virtuozzo.com
Tue Apr 9 15:52:47 MSK 2019


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 at 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 at alibaba-inc.com>
    Signed-off-by: Martin Zhang <martinbj2008 at gmail.com>
    Acked-by: Eric Dumazet <edumazet at google.com>
    Signed-off-by: David S. Miller <davem at davemloft.net>
    
    https://jira.sw.ru/browse/PSBM-93713
    
    (cherry picked from commit 19125c1a4fd873421698876f34a06dbe18d25f17)
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 net/core/neighbour.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
 	write_unlock(&neigh->lock);
 	if (neigh->ops->solicit)
 		neigh->ops->solicit(neigh, skb);



More information about the Devel mailing list