From: "yanjun.zhu" <yanjun.zhu@linux.dev>
To: 代彦龙 <daiyanlong@kylinos.cn>,
"Kalesh Anakkur Purayil" <kalesh-anakkur.purayil@broadcom.com>
Cc: jgg <jgg@ziepe.ca>, leon <leon@kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-rdma <linux-rdma@vger.kernel.org>,
"selvin.xavier" <selvin.xavier@broadcom.com>,
dyl_wlc <dyl_wlc@163.com>
Subject: Re: åå¤: Re: [PATCH v2 rdma-rc] RDMA/bnxt_re: Fix a potential memory leak in destroy_gsi_sqp
Date: Fri, 26 Sep 2025 09:11:11 -0700 [thread overview]
Message-ID: <f207b88c-da98-4fe2-b91f-ed07354ff019@linux.dev> (raw)
In-Reply-To: <vuezvoi8y7j-vuko1z952k0@nsmail8.2--kylin--1>
On 9/25/25 7:39 PM, ä»£å½¦é¾ wrote:
> Hello Kalesh, Selvin, List,
>
> Gentle ping on this patch.
> I just wanted to follow up and make sure the v2 version was received
> correctly.
>
> For easy reference, the patch is available on lore.kernel.org here:
> https://lore.kernel.org/all/20250924061444.11288-1-daiyanlong <https://
> lore.kernel.org/all/20250924061444.11288-1-daiyanlong>@kylinos.cn/
>
> Please let me know if there's anything else needed from my side, or if
> you've had a chance to review the technical changes.
> Thank you for your time and consideration.
>
> Best regards,
> YanLong Dai
>
Hi, YanLong
In regions where Chinese is not supported, the email may appear garbled.
We recommend replacing any Chinese content in the email with the
corresponding English to ensure clarity.
Thanks a lot.
Yanjun.Zhu
>
>
>
> *主 题:*Re: [PATCH v2 rdma-rc] RDMA/bnxt_re: Fix a potential memory
> leak in destroy_gsi_sqp
> *日 期:*2025年09月24日14:33
> *发件人:*代彦龙
> *收件人:*Kalesh Anakkur Purayil,代彦龙
> *抄送人:*jgg,leon,linux-kernel,linux-rdma,selvin.xavier,dyl_wlc
>
> Hello Selvin, Kalesh, List,
>
> Thank you so much for your patience and guidance throughout this
> process. I truly appreciate you taking the time to review my patches and
> provide detailed feedback - it has been a great learning experience.
>
> I have incorporated all of your suggestions in this v2 version:
> - Added the "rdma-rc" target tree prefix in the subject line
> - Used proper version numbering (v2)
> - Included the changelog below the '---' line as recommended
>
> The updated patch is attached. I believe it now follows all the required
> guidelines. Please let me know if there are any further issues or
> adjustments needed.
>
> The patch is also available on lore.kernel.org here:
> https://lore.kernel.org/all/20250924061444.11288-1-daiyanlong <https://
> lore.kernel.org/all/20250924061444.11288-1-daiyanlong>@kylinos.cn/
>
> Best regards,
> YanLong Dai
>
> ---
>
>
>
>
> *主 题:*Re: [PATCH] RDMA/bnxt_re: Fix a potential memory leak in
> destroy_gsi_sqp
> *日 期:*2025年09月24日13:01
> *发件人:*Kalesh Anakkur Purayil
> *收件人:*Kalesh Anakkur Purayil
> *抄送人:*jgg,leon,linux-kernel,linux-rdma,selvin.xavier,dyl_wlc
>
> Hi YanLong,
> Few generic guidelines.
> 1. You should select a target tree in the subject prefix and specify a
> revision number. Since this is a bug fix, the target tree should be
> "rdma-rc".
> 2. When you send an updated version of the patch, please mention version
> number. Also, mention the changes made in each version. i.e. under ---
> you can add extra info that will not be included in the actual commit,
> e.g. changes between each version of patches.
> One comment in line.
>
> On Mon, Sep 22, 2025 at 7:53 AM YanLong Dai <daiyanlong@kylinos.cn
> <mailto:daiyanlong@kylinos.cn>> wrote:
>
> From: daiyanlong <daiyanlong@kylinos.cn <mailto:daiyanlong@kylinos.cn>>
>
> The current error handling path in bnxt_re_destroy_gsi_sqp() could lead
> to a resource leak. When bnxt_qplib_destroy_qp() fails, the function
> jumps to the 'fail' label and returns immediately, skipping the call
> to bnxt_qplib_free_qp_res().
>
> Continue the resource teardown even if bnxt_qplib_destroy_qp() fails,
> which aligns with the driver's general error handling strategy and
> prevents the potential leak.
>
> Fixes: 8dae419f9ec73 ("RDMA/bnxt_re: Refactor queue pair creation code")
> [Kalesh] Blank line is not needed between Fixes tag and SOB tag
> Signed-off-by: daiyanlong <daiyanlong@kylinos.cn
> <mailto:daiyanlong@kylinos.cn>>
> ---
> drivers/infiniband/hw/bnxt_re/ib_verbs.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/
> infiniband/hw/bnxt_re/ib_verbs.c
> index 260dc67b8b87..15d3f5d5c0ee 100644
> --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> @@ -931,10 +931,9 @@ static int bnxt_re_destroy_gsi_sqp(struct
> bnxt_re_qp *qp)
>
> ibdev_dbg(&rdev->ibdev, "Destroy the shadow QP\n");
> rc = bnxt_qplib_destroy_qp(&rdev->qplib_res, &gsi_sqp-
> >qplib_qp);
> - if (rc) {
> + if (rc)
> ibdev_err(&rdev->ibdev, "Destroy Shadow QP failed");
> - goto fail;
> - }
> +
> bnxt_qplib_free_qp_res(&rdev->qplib_res, &gsi_sqp->qplib_qp);
>
> /* remove from active qp list */
> @@ -951,8 +950,6 @@ static int bnxt_re_destroy_gsi_sqp(struct
> bnxt_re_qp *qp)
> rdev->gsi_ctx.sqp_tbl = NULL;
>
> return 0;
> -fail:
> - return rc;
> }
>
> /* Queue Pairs */
> --
> 2.43.0
>
>
> --
> Regards,
> Kalesh AP
>
>
> ---
>
>
> ---
>
next prev parent reply other threads:[~2025-09-26 16:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 2:39 回复: Re: [PATCH v2 rdma-rc] RDMA/bnxt_re: Fix a potential memory leak in destroy_gsi_sqp 代彦龙
2025-09-26 16:11 ` yanjun.zhu [this message]
2025-09-28 1:11 ` YanLong Dai
2025-09-28 2:06 ` [PATCH " Zhu Yanjun
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=f207b88c-da98-4fe2-b91f-ed07354ff019@linux.dev \
--to=yanjun.zhu@linux.dev \
--cc=daiyanlong@kylinos.cn \
--cc=dyl_wlc@163.com \
--cc=jgg@ziepe.ca \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.