From: Paolo Abeni <pabeni@redhat.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Zhiping Zhang <zhipingz@meta.com>, Jason Gunthorpe <jgg@ziepe.ca>,
Saeed Mahameed Michael <saeedm@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
Michael Guralnik <michaelgur@nvidia.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net v2] net/mlx5: free mlx5_st_idx_data on final dealloc
Date: Fri, 17 Jul 2026 11:47:33 +0200 [thread overview]
Message-ID: <62b9c471-e6a0-472b-a549-81128cb9a8ac@redhat.com> (raw)
In-Reply-To: <20260713080816.GA327832@unreal>
On 7/13/26 10:08 AM, Leon Romanovsky wrote:
> On Fri, Jul 10, 2026 at 01:25:45PM +0200, Paolo Abeni wrote:
>> On 7/3/26 12:24 AM, Zhiping Zhang wrote:
>>> Workloads that repeatedly allocate and release mkeys carrying TPH
>>> steering-tag hints (e.g. churning RDMA MRs) leak one
>>> struct mlx5_st_idx_data per cycle; kmemleak flags it as unreferenced
>>> and the kmalloc slab grows over time.
>>>
>>> When the last reference to an ST table entry is dropped,
>>> mlx5_st_dealloc_index() removed the entry from idx_xa but the backing
>>> mlx5_st_idx_data allocation was never freed.
>>>
>>> Free idx_data after the xa_erase() so the lifetime of the bookkeeping
>>> struct matches the lifetime of the ST entry it tracks.
>>>
>>> Cc: stable@vger.kernel.org
>>> Fixes: 888a7776f4fb ("net/mlx5: Add support for device steering tag")
>>> Reviewed-by: Michael Gur <michaelgur@nvidia.com>
>>> Signed-off-by: Zhiping Zhang <zhipingz@meta.com>
>> @Leon, @Saeed, @Tariq: just in case this fell under the radar, it's
>> waiting for your ack.
>
> Tariq and I completed this on Jul 5 and Jul 6.
>
> https://lore.kernel.org/linux-rdma/20260705141920.GI15188@unreal/
> https://lore.kernel.org/linux-rdma/0bb37f75-c94a-4a10-b115-186b71daf14f@nvidia.com/
Thank you for pointing out and for the review. PW lost track of it,
likely because there are multiple copies of the same patch/revision and
only one of them landed on the netdev ML.
Applying right now.
/P
next prev parent reply other threads:[~2026-07-17 9:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 22:24 [PATCH net v2] net/mlx5: free mlx5_st_idx_data on final dealloc Zhiping Zhang
2026-07-10 11:25 ` Paolo Abeni
2026-07-13 8:08 ` Leon Romanovsky
2026-07-17 9:47 ` Paolo Abeni [this message]
2026-07-17 10:00 ` patchwork-bot+netdevbpf
[not found] <20260630165324.2859353-1-zhipingz@meta.com>
2026-07-05 14:19 ` Leon Romanovsky
2026-07-06 12:33 ` Tariq Toukan
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=62b9c471-e6a0-472b-a549-81128cb9a8ac@redhat.com \
--to=pabeni@redhat.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=michaelgur@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=stable@vger.kernel.org \
--cc=tariqt@nvidia.com \
--cc=zhipingz@meta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox