Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 67cdb40ca444 ("[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>

authored by

Yi Liu and committed by
Leon Romanovsky
58b604df 5ee62b4a

+1 -1
+1 -1
drivers/infiniband/core/uverbs_cmd.c
··· 2242 2242 if (ret) 2243 2243 return ERR_PTR(ret); 2244 2244 2245 - user_wr = kmalloc(wqe_size, GFP_KERNEL); 2245 + user_wr = kmalloc(wqe_size, GFP_KERNEL | __GFP_NOWARN); 2246 2246 if (!user_wr) 2247 2247 return ERR_PTR(-ENOMEM); 2248 2248