From: Yevgeny Kliteynik Date: Thu, 7 May 2026 17:34:42 +0000 (+0300) Subject: net/mlx5: HWS, Handle destroying table that has a miss table X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60e9e82f162ab7399373ff2185119289e4f6dc06;p=thirdparty%2Flinux.git net/mlx5: HWS, Handle destroying table that has a miss table If a table has a miss table that was created by 'mlx5hws_table_set_default_miss' API function, its miss_tbl keeps the table that points to it in a list. If such table is deleted, we need to also remove it from the miss_tbl list, otherwise the node in miss_tbl list will contain garbage. Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Reviewed-by: Moshe Shemesh Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20260507173443.320465-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/table.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/table.c index bd292485a25b..dd7927983ab2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/table.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/table.c @@ -282,6 +282,9 @@ int mlx5hws_table_destroy(struct mlx5hws_table *tbl) goto unlock_err; } + if (tbl->default_miss.miss_tbl) + list_del_init(&tbl->default_miss.next); + list_del_init(&tbl->tbl_list_node); mutex_unlock(&ctx->ctrl_lock);