[Devel] [PATCH RHEL8 COMMIT] i40iw: Use kvzalloc in i40iw_allocate_virt_mem()
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Jun 11 15:33:48 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.40
------>
commit 364bbf16fffc860b0a3cd7cccf0fe1bdd2de1247
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date: Fri Jun 11 15:33:47 2021 +0300
i40iw: Use kvzalloc in i40iw_allocate_virt_mem()
Fixes the following:
WARNING: CPU: 8 PID: 1711 at mm/page_alloc.c:3531 __alloc_pages_nodemask+0x311/0x610
order 5 >= 3, gfp 0xc0d0
Call Trace:
[<ffffffff9e391fd8>] dump_stack+0x19/0x1b
[<ffffffff9dc98778>] __warn+0xd8/0x100
[<ffffffff9dc987ff>] warn_slowpath_fmt+0x5f/0x80
[<ffffffff9ddd4371>] __alloc_pages_nodemask+0x311/0x610
[<ffffffff9de26a78>] alloc_pages_current+0x98/0x110
[<ffffffff9ddf1ae8>] kmalloc_order+0x18/0x40
[<ffffffff9ddf1b36>] kmalloc_order_trace+0x26/0xa0
[<ffffffff9de35ce1>] __kmalloc+0x281/0x2a0
[<ffffffffc08f77e1>] i40iw_allocate_virt_mem+0x21/0x40 [i40iw]
[<ffffffffc08eadd6>] i40iw_config_fpm_values+0x376/0x4c0 [i40iw]
[<ffffffffc08f0288>] i40iw_open.part.10+0x888/0x17f0 [i40iw]
[<ffffffffc08f122b>] i40iw_open+0x3b/0x50 [i40iw]
[<ffffffffc04f19cd>] i40e_client_subtask+0xbd/0x130 [i40e]
[<ffffffffc04d408f>] i40e_service_task+0x62f/0x1360 [i40e]
[<ffffffff9dcbc1e2>] process_one_work+0x182/0x440
[<ffffffff9dcbd396>] worker_thread+0x126/0x3c0
[<ffffffff9dcc4401>] kthread+0xd1/0xe0
[<ffffffff9e3a4cf7>] ret_from_fork_nospec_begin+0x21/0x21
https://pmc.acronis.com/browse/VSTOR-20675
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
(cherry-picked from vz7 commit a961ad3bf5f7 ("i40iw: Use kvzalloc in
i40iw_allocate_virt_mem()"))
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
drivers/infiniband/hw/i40iw/i40iw_utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/i40iw/i40iw_utils.c b/drivers/infiniband/hw/i40iw/i40iw_utils.c
index 016524683e17..c8659e6729c7 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_utils.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_utils.c
@@ -796,7 +796,7 @@ enum i40iw_status_code i40iw_allocate_virt_mem(struct i40iw_hw *hw,
return I40IW_ERR_PARAM;
mem->size = size;
- mem->va = kzalloc(size, GFP_KERNEL);
+ mem->va = kvzalloc(size, GFP_KERNEL);
if (mem->va)
return 0;
@@ -818,7 +818,7 @@ enum i40iw_status_code i40iw_free_virt_mem(struct i40iw_hw *hw,
* mem->va points to the parent of mem, so both mem and mem->va
* can not be touched once mem->va is freed
*/
- kfree(mem->va);
+ kvfree(mem->va);
return 0;
}
More information about the Devel
mailing list