[RH7,2/2] net: silence high-order-allocation warning in sctp_pack_cookie()

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

Details

Message ID 354bc980-de11-8780-12c7-6f70130ce1b1@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 reproduces high-order-allocation warning:
 -----------[ cut here ]-----------
 WARNING: CPU: 3 PID: 74823 at mm/page_alloc.c:3533 __alloc_pages_nodemask+0x1b1/0x600
 order 5 >= 3, gfp 0xc020
 Modules linked in: sctp
 CPU: 3 PID: 74823 Comm: sctp_big_chunk ve: 0 Kdump: loaded Tainted: G W ------------ 3.10.0-1127.18.2.vz7.163
 Hardware name: Virtuozzo OpenStack Compute, BIOS 1.11.0-2.vz7.1 04/01/2014
 Call Trace:
 <IRQ> [<ffffffff8a1b8a47>] dump_stack+0x19/0x1b
 [<ffffffff89a9d198>] __warn+0xd8/0x100
 [<ffffffff89a9d21f>] warn_slowpath_fmt+0x5f/0x80
 [<ffffffff89bdfaa1>] __alloc_pages_nodemask+0x1b1/0x600
 [<ffffffff89c35d38>] alloc_pages_current+0x98/0x110
 [<ffffffff89bff088>] kmalloc_order+0x18/0x40
 [<ffffffff89bff0d6>] kmalloc_order_trace+0x26/0xa0
 [<ffffffff89c454e1>] __kmalloc+0x281/0x2a0
 [<ffffffffc0a83244>] sctp_make_init_ack+0x104/0x6b0 [sctp]
 [<ffffffffc0a77036>] sctp_sf_do_5_1B_init+0x286/0x330 [sctp]
 [<ffffffffc0a7ab4d>] sctp_do_sm+0xad/0x350 [sctp]
 [<ffffffffc0a7e6f2>] sctp_endpoint_bh_rcv+0x122/0x240 [sctp]
 [<ffffffffc0a881b1>] sctp_inq_push+0x51/0x70 [sctp]
 [<ffffffffc0a9b53b>] sctp_rcv+0xa8b/0xbd0 [sctp]
 [<ffffffffc0a9e87e>] sctp6_rcv+0xe/0x20 [sctp]
 [<ffffffff8a153c07>] ip6_input_finish+0xd7/0x450
 [<ffffffff8a1544fa>] ip6_input+0x3a/0xb0
 [<ffffffff8a153a0e>] ip6_rcv_finish+0x3e/0xc0
 [<ffffffff8a1542a7>] ipv6_rcv+0x327/0x540
 [<ffffffff8a08a6b9>] __netif_receive_skb_core+0x729/0xa10
 [<ffffffff8a08a9b8>] __netif_receive_skb+0x18/0x60
 [<ffffffff8a08b99e>] process_backlog+0xae/0x180
 [<ffffffff8a08b06f>] net_rx_action+0x27f/0x3a0
 [<ffffffff8a1d1125>] __do_softirq+0x125/0x2bb
 [<ffffffff8a1cd54c>] call_softirq+0x1c/0x30
 <EOI> [<ffffffff89a2f645>] do_softirq+0x65/0xa0
 [<ffffffff89aa662b>] __local_bh_enable_ip+0x9b/0xb0
 [<ffffffff89aa6657>] local_bh_enable+0x17/0x20
 [<ffffffff8a150b07>] ip6_finish_output2+0x1a7/0x580
 [<ffffffff8a15319c>] ip6_finish_output+0x8c/0xf0
 [<ffffffff8a153257>] ip6_output+0x57/0x110
 [<ffffffff8a173007>] rawv6_sendmsg+0x6d7/0xcd0
 [<ffffffff8a113cf9>] inet_sendmsg+0x69/0xb0
 [<ffffffff8a069480>] sock_sendmsg+0xb0/0xf0
 [<ffffffff8a069ab1>] SYSC_sendto+0x121/0x1c0
 [<ffffffff8a06b6ce>] SyS_sendto+0xe/0x10
 [<ffffffff8a1cbf92>] system_call_fastpath+0x25/0x2a
 --[ end trace 49ad7969a95b86af ]--

https://jira.sw.ru/browse/PSBM-122200
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
 net/sctp/sm_make_chunk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 32d685a..ebd103f 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1670,7 +1670,7 @@  static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep,
 	/* Clear this memory since we are sending this data structure
 	 * out on the network.
 	 */
-	retval = kzalloc(*cookie_len, GFP_ATOMIC);
+	retval = kzalloc(*cookie_len, GFP_ATOMIC|__GFP_ORDER_NOWARN);
 	if (!retval)
 		goto nodata;