All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Chenguang Zhao <zhaochenguang@kylinos.cn>
Cc: "Jason Gunthorpe" <jgg@ziepe.ca>,
	"Vlad Dumitrescu" <vdumitrescu@nvidia.com>,
	"Sean Hefty" <shefty@nvidia.com>,
	"Håkon Bugge" <haakon.bugge@oracle.com>,
	"Kees Cook" <kees@kernel.org>,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/cm: fix timewait leak and AV cleanup on ib_send_cm_req() errors
Date: Wed, 13 May 2026 17:22:34 +0300	[thread overview]
Message-ID: <20260513142234.GG15586@unreal> (raw)
In-Reply-To: <20260507094317.1018853-1-zhaochenguang@kylinos.cn>

On Thu, May 07, 2026 at 05:43:17PM +0800, Chenguang Zhao wrote:
> cm_create_timewait_info() success was followed by error returns that
> never freed cm_id_priv->timewait_info, leaking it and tripping the
> WARN_ON(timewait_info) on a later ib_send_cm_req().

Could you please include the kernel panic message printed by that WARN_ON()?
I expect that the failed ib_send_cm_req() is handled and cleared later by
its callers.

Thanks

> 
> After cm_move_av_from_path(), cm_alloc_priv_msg() and ib_post_send_mad()
> failures must cm_destroy_av() the moved primary/alternate cm_id_priv
> state before unlock; fold both cases into shared cleanup with kfree of
> timewait_info.
> 
> Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
> ---
>  drivers/infiniband/core/cm.c | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)

  reply	other threads:[~2026-05-13 14:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07  9:43 [PATCH] RDMA/cm: fix timewait leak and AV cleanup on ib_send_cm_req() errors Chenguang Zhao
2026-05-13 14:22 ` Leon Romanovsky [this message]
2026-06-02 19:30 ` Jason Gunthorpe

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=20260513142234.GG15586@unreal \
    --to=leon@kernel.org \
    --cc=haakon.bugge@oracle.com \
    --cc=jgg@ziepe.ca \
    --cc=kees@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=shefty@nvidia.com \
    --cc=vdumitrescu@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 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.