Re: [PATCH] RDMA/uverbs: Reject WQ creation without a completion queue

From: Leon Romanovsky

Date: Thu Sep 10 2026 - 08:39:23 EST


On Mon, Sep 07, 2026 at 07:39:18PM +0800, lirongqing wrote:
> From: Li RongQing <lirongqing@xxxxxxxxx>
>
> UVERBS_ATTR_CREATE_WQ_CQ_HANDLE is declared UA_OPTIONAL in the ioctl
> method definition, so the mandatory attribute bitmap does not enforce
> its presence. When userspace omits it, uverbs_attr_get_obj() returns
> ERR_PTR(-ENOENT) and the handler stores that error pointer into
> wq_init_attr.cq without validation.

That handle should be mandatory, declare it as UA_MANDATORY.

Thanks