lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f207b88c-da98-4fe2-b91f-ed07354ff019@linux.dev>
Date: Fri, 26 Sep 2025 09:11:11 -0700
From: "yanjun.zhu" <yanjun.zhu@...ux.dev>
To: 代彦龙 <daiyanlong@...inos.cn>,
 Kalesh Anakkur Purayil <kalesh-anakkur.purayil@...adcom.com>
Cc: jgg <jgg@...pe.ca>, leon <leon@...nel.org>,
 linux-kernel <linux-kernel@...r.kernel.org>,
 linux-rdma <linux-rdma@...r.kernel.org>,
 "selvin.xavier" <selvin.xavier@...adcom.com>, dyl_wlc <dyl_wlc@....com>
Subject: Re: åå¤: Re: [PATCH v2 rdma-rc] RDMA/bnxt_re: Fix a potential memory leak in destroy_gsi_sqp

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@...inos.cn 
> <mailto:daiyanlong@...inos.cn>> wrote:
> 
>     From: daiyanlong <daiyanlong@...inos.cn <mailto:daiyanlong@...inos.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@...inos.cn
>     <mailto:daiyanlong@...inos.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
> 
> 
> ---
> 
> 
> ---
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ