Re: [PATCH] net/mlx5: Free steering tag data on release
From: Simon Horman
Date: Mon Jun 15 2026 - 08:40:43 EST
On Sat, Jun 13, 2026 at 11:37:25PM +0800, lirongqing wrote:
> From: Li RongQing <lirongqing@xxxxxxxxx>
>
> mlx5_st_alloc_index() allocates an mlx5_st_idx_data object for
> each new steering tag table index and stores it in the xarray.
> When the last user releases the index, mlx5_st_dealloc_index()
> removes the entry from the xarray but did not free the backing
> object, leaking memory.
>
> Free idx_data after erasing the xarray entry once the refcount
> reaches zero.
>
> Fixes: 888a7776f4fb0 ("net/mlx5: Add support for device steering tag")
> Signed-off-by: Li RongQing <lirongqing@xxxxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>