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

From: Leon Romanovsky

Date: Tue Sep 15 2026 - 04:02:45 EST


On Thu, Sep 10, 2026 at 03:33:18PM +0300, Leon Romanovsky wrote:
> 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.

ok, I applied it and fixed this patch locally.

Thanks

>
> Thanks
>