Commit 58b604df authored by Yi Liu's avatar Yi Liu Committed by Leon Romanovsky
Browse files

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: 67cdb40c ("[IB] uverbs: Implement more commands")
Signed-off-by: default avatarYi Liu <liuy22@mails.tsinghua.edu.cn>
Link: https://patch.msgid.link/20260129094900.3517706-1-liuy22@mails.tsinghua.edu.cn


Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 5ee62b4a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2242,7 +2242,7 @@ ib_uverbs_unmarshall_recv(struct uverbs_req_iter *iter, u32 wr_count,
	if (ret)
		return ERR_PTR(ret);

	user_wr = kmalloc(wqe_size, GFP_KERNEL);
	user_wr = kmalloc(wqe_size, GFP_KERNEL | __GFP_NOWARN);
	if (!user_wr)
		return ERR_PTR(-ENOMEM);