[Devel] [PATCH RHEL8 COMMIT] ipv6: silence high-order allocation warinig in rawv6_sendmsg()

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jun 21 21:05:31 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.47
------>
commit fe9abe78475afe9f04177c0635d28858e640e3db
Author: Vasily Averin <vvs at virtuozzo.com>
Date:   Mon Jun 21 21:05:31 2021 +0300

    ipv6: silence high-order allocation warinig in rawv6_sendmsg()
    
    neoLTP sctp_big_chunk testcase triggers high-order-allocation warning
     WARNING: CPU: 2 PID: 913629 at mm/page_alloc.c:3533 __alloc_pages_nodemask+0x1b1/0x600
     order 5 >= 3, gfp 0x2044d0
     Kernel panic - not syncing: panic_on_warn set ...
    
     CPU: 2 PID: 913629 Comm: sctp_big_chunk ve: 0 Kdump: loaded Tainted: G OE ------------ 3.10.0-1127.18.2.vz7.163.39 #1 163.39
     Hardware name: Virtuozzo OpenStack Compute, BIOS 1.11.0-2.vz7.1 04/01/2014
     Call Trace:
     [<ffffffffabbb8a47>] dump_stack+0x19/0x1b
     [<ffffffffabbb1a1a>] panic+0xe8/0x21f
     [<ffffffffab49d1ba>] __warn+0xfa/0x100
     [<ffffffffab49d21f>] warn_slowpath_fmt+0x5f/0x80
     [<ffffffffab5dfaa1>] __alloc_pages_nodemask+0x1b1/0x600
     [<ffffffffabbb4e19>] kmalloc_large_node+0x5f/0x80
     [<ffffffffab647f12>] __kmalloc_node_track_caller+0x292/0x300
     [<ffffffffaba72994>] __kmalloc_reserve.isra.32+0x44/0xa0
     [<ffffffffaba739dd>] __alloc_skb+0x8d/0x2d0
     [<ffffffffaba73c77>] alloc_skb_with_frags+0x57/0x1e0
     [<ffffffffaba6f776>] sock_alloc_send_skb+0x1b6/0x250
     [<ffffffffabb72efb>] rawv6_sendmsg+0x5cb/0xcd0
     [<ffffffffabb13cf9>] inet_sendmsg+0x69/0xb0
     [<ffffffffaba69480>] sock_sendmsg+0xb0/0xf0
     [<ffffffffaba69ab1>] SYSC_sendto+0x121/0x1c0
     [<ffffffffaba6b6ce>] SyS_sendto+0xe/0x10
     [<ffffffffabbcbf92>] system_call_fastpath+0x25/0x2a
    
    https://jira.sw.ru/browse/PSBM-122200
    Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
    
    (cherry-picked from vz7 commit d4566fb9686f60b45bc0beeb2598f0917db2481a)
    https://jira.sw.ru/browse/PSBM-127858
    Signed-off-by: Valeriy Vdovin <valeriy.vdovin at virtuozzo.com>
---
 net/ipv6/raw.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index e2268cffaf15..609bc1d4a499 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -642,9 +642,10 @@ static int rawv6_send_hdrinc(struct sock *sk, struct msghdr *msg, int length,
 	if (flags&MSG_PROBE)
 		goto out;
 
-	skb = sock_alloc_send_skb(sk,
+	skb = sock_alloc_send_skb_flags(sk,
 				  length + hlen + tlen + 15,
-				  flags & MSG_DONTWAIT, &err);
+				  flags & MSG_DONTWAIT, &err,
+				  __GFP_ORDER_NOWARN);
 	if (!skb)
 		goto error;
 	skb_reserve(skb, hlen);


More information about the Devel mailing list