Skip to content

Commit 58b604d

Browse files
liuyi-thurleon
authored andcommitted
RDMA/uverbs: Add __GFP_NOWARN to ib_uverbs_unmarshall_recv() kmalloc
Since wqe_size in ib_uverbs_unmarshall_recv() is user-provided and already validated, but can still be large, add __GFP_NOWARN to suppress memory allocation warnings for large sizes, consistent with the similar fix in ib_uverbs_post_send(). Fixes: 67cdb40 ("[IB] uverbs: Implement more commands") Signed-off-by: Yi Liu <liuy22@mails.tsinghua.edu.cn> Link: https://patch.msgid.link/20260129094900.3517706-1-liuy22@mails.tsinghua.edu.cn Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent 5ee62b4 commit 58b604d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/infiniband/core/uverbs_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2242,7 +2242,7 @@ ib_uverbs_unmarshall_recv(struct uverbs_req_iter *iter, u32 wr_count,
22422242
if (ret)
22432243
return ERR_PTR(ret);
22442244

2245-
user_wr = kmalloc(wqe_size, GFP_KERNEL);
2245+
user_wr = kmalloc(wqe_size, GFP_KERNEL | __GFP_NOWARN);
22462246
if (!user_wr)
22472247
return ERR_PTR(-ENOMEM);
22482248

0 commit comments

Comments
 (0)