Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Chenguang Zhao <zhaochenguang@kylinos.cn>
Cc: leon@kernel.org, edwards@nvidia.com, mbloch@nvidia.com,
	michaelgur@nvidia.com, msanalla@nvidia.com, ohartoov@nvidia.com,
	jiri@resnulli.us, kalesh-anakkur.purayil@broadcom.com,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH v2] RDMA/core: Fix memory leak in __ib_create_cq() on invalid cqe
Date: Thu, 2 Jul 2026 14:22:43 -0300	[thread overview]
Message-ID: <20260702172243.GA1507559@nvidia.com> (raw)
In-Reply-To: <20260625020148.224537-1-zhaochenguang@kylinos.cn>

On Thu, Jun 25, 2026 at 10:01:48AM +0800, Chenguang Zhao wrote:
> Move the zero CQE validation before rdma_zalloc_drv_obj() to avoid
> leaking the CQ object when returning -EINVAL.
> 
> Fixes: a2917582887a ("RDMA/core: Reject zero CQE count")
> Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> ---
> v2:
>  - move validation before rdma_zalloc_drv_obj() as suggested by Kalesh.
> ---
>  drivers/infiniband/core/verbs.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied to for-rc, thanks

Jason

      parent reply	other threads:[~2026-07-02 17:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24  2:59 [PATCH] RDMA/core: Fix memory leak in __ib_create_cq() on invalid cqe Chenguang Zhao
2026-06-24  8:38 ` Kalesh Anakkur Purayil
2026-06-25  2:01 ` [PATCH v2] " Chenguang Zhao
2026-06-25  7:32   ` Kalesh Anakkur Purayil
2026-07-02 17:22   ` Jason Gunthorpe [this message]

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=20260702172243.GA1507559@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=edwards@nvidia.com \
    --cc=jiri@resnulli.us \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=michaelgur@nvidia.com \
    --cc=msanalla@nvidia.com \
    --cc=ohartoov@nvidia.com \
    --cc=zhaochenguang@kylinos.cn \
    /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