From: sashiko-bot@kernel.org
To: "Abhijit Gangurde" <abhijit.gangurde@amd.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [for-next v1 1/2] RDMA/ionic: Accept CQ ring buffers as ioctl umem attributes
Date: Wed, 18 Nov 2026 15:54:35 +0000 [thread overview]
Message-ID: <sashiko-outbox-221386@kernel.org> (raw)
In-Reply-To: <20261118152313.113714-2-abhijit.gangurde@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] RDMA/ionic: DMABUF CQ creation fails when req_cq->addr is 0
--
commit d9049031ddccb7cfb004f9f8562a0180d2a52483
Author: Abhijit Gangurde <abhijit.gangurde@amd.com>
RDMA/ionic: Accept CQ ring buffers as ioctl umem attributes
This commit adds optional per-UDMA UVERBS_ATTR_UMEM attributes to
UVERBS_METHOD_CQ_CREATE so userspace can pass CQ ring buffers as VA or
DMABUF descriptors.
> diff --git a/drivers/infiniband/hw/ionic/ionic_controlpath.c b/drivers/infiniband/hw/ionic/ionic_controlpath.c
> index 8a0a1575a339c..11458262f280d 100644
> --- a/drivers/infiniband/hw/ionic/ionic_controlpath.c
> +++ b/drivers/infiniband/hw/ionic/ionic_controlpath.c
[ ... ]
> @@ -110,13 +169,9 @@ int ionic_create_cq_common(struct ionic_vcq *vcq,
> if (rc)
> goto err_qdesc;
>
> - cq->umem = ib_umem_get_cq_buf_or_va(&dev->ibdev, NULL,
> - req_cq->addr, req_cq->size,
> - IB_ACCESS_LOCAL_WRITE);
> - if (IS_ERR(cq->umem)) {
> - rc = PTR_ERR(cq->umem);
> + rc = ionic_cq_get_user_umem(dev, cq, req_cq, attrs, udma_idx);
> + if (rc)
> goto err_qdesc;
> - }
[Severity: High]
Does DMABUF CQ creation fail with -EINVAL when userspace passes
req_cq->addr == 0?
ionic_create_cq_common() calls ionic_validate_qdesc(req_cq) before
ionic_cq_get_user_umem():
drivers/infiniband/hw/ionic/ionic_controlpath.c:ionic_validate_qdesc() {
if (!q->addr || !q->size || !q->mask ||
!q->depth_log2 || !q->stride_log2)
return -EINVAL;
...
}
For IB_UVERBS_BUFFER_TYPE_DMABUF, the ring buffer is specified by desc.fd
and desc.addr while req_cq->addr is unused and expected to be zero (as in
the follow-up commit "RDMA/ionic: Accept QP SQ and RQ rings as ioctl umem
attributes", which validates only queue geometry for DMABUF descriptors),
so ionic_validate_qdesc() rejects the request before reaching
ionic_cq_get_user_umem().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261118152313.113714-1-abhijit.gangurde@amd.com?part=1
next prev parent reply other threads:[~2026-11-18 15:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 15:23 [for-next v1 0/2] RDMA/ionic: Accept CQ, SQ, and RQ rings as umem attributes Abhijit Gangurde
2026-11-18 15:23 ` [for-next v1 1/2] RDMA/ionic: Accept CQ ring buffers as ioctl " Abhijit Gangurde
2026-11-18 15:54 ` sashiko-bot [this message]
2026-11-18 15:23 ` [for-next v1 2/2] RDMA/ionic: Accept QP SQ and RQ rings " Abhijit Gangurde
2026-11-18 15:51 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-221386@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=abhijit.gangurde@amd.com \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox