[RH7,1/2] ipv6: silence high-order allocation warinig in rawv6_sendmsg()

Submitted by Vasily Averin on Nov. 20, 2020, 8:23 a.m.

Details

Message ID 2eedc1b8-9f40-bffe-8080-05ebd32c5ad0@virtuozzo.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Vasily Averin Nov. 20, 2020, 8:23 a.m.
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@virtuozzo.com>
---
 net/ipv6/raw.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index f91636e..f5f72bb 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -623,9 +623,10 @@  static int rawv6_send_hdrinc(struct sock *sk, void *from, 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 == NULL)
 		goto error;
 	skb_reserve(skb, hlen);