From: sashiko-bot@kernel.org
To: "Edward Srouji" <edwards@nvidia.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next v2] RDMA/mlx5: Warn on pending software WCs at CQ destroy
Date: Sun, 08 Nov 2026 16:14:47 +0000 [thread overview]
Message-ID: <sashiko-outbox-203875@kernel.org> (raw)
In-Reply-To: <20261108-free-sw-wcs-v2-1-d1e6d80d2746@nvidia.com>
> Software WCs generated by mlx5_ib_generate_wc() are allocated, linked
> onto cq->wc_list and only freed when a consumer polls them. Anything
> still on the list when the CQ is destroyed would be leaked.
>
> This cannot happen with in-tree users. Soft WCs are only generated for
> send completions of the mlx5 GSI QP, and ib_mad is the only creator of
> GSI QPs. Every MAD send holds a reference on its agent until its send
> completion has been processed, unregister_mad_agent() waits for those
> references, and ib_mad_port_close() frees the CQ only after all agents
> on the port are unregistered. Since poll_soft_wc() frees each soft WC
> before its completion handler runs, wc_list is empty by then.
>
> Add a WARN_ON() so that a consumer violating this assumption is caught
> instead of silently leaking memory.
>
> Signed-off-by: Edward Srouji <edwards@nvidia.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261108-free-sw-wcs-v2-1-d1e6d80d2746@nvidia.com?part=1
next prev parent reply other threads:[~2026-11-08 16:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 16:06 [PATCH rdma-next v2] RDMA/mlx5: Warn on pending software WCs at CQ destroy Edward Srouji
2026-11-08 16:14 ` sashiko-bot [this message]
2026-11-09 9:20 ` Leon Romanovsky
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-203875@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=edwards@nvidia.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 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.