]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5e: CT: Fix queued up restore put() executing after relevant ft release
authorPaul Blakey <paulb@nvidia.com>
Tue, 29 Mar 2022 14:42:46 +0000 (17:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:25:38 +0000 (12:25 +0200)
commite07c13fbdded4e43e6a8235c8c82c82d23f5d57e
tree49e7940b182faa832c30b5b46f0f2c0bd93c2e98
parentd8338a7a09572a51dd903d6ca07f15c558bd0c43
net/mlx5e: CT: Fix queued up restore put() executing after relevant ft release

commit b069e14fff46c8da9fcc79957f8acaa3e2dfdb6b upstream.

__mlx5_tc_ct_entry_put() queues release of tuple related to some ct FT,
if that is the last reference to that tuple, the actual deletion of
the tuple can happen after the FT is already destroyed and freed.

Flush the used workqueue before destroying the ct FT.

Fixes: a2173131526d ("net/mlx5e: CT: manage the lifetime of the ct entry object")
Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
Signed-off-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c