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)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 4 May 2022 07:00:05 +0000 (00:00 -0700)
commitb069e14fff46c8da9fcc79957f8acaa3e2dfdb6b
tree0838eb6006e2fb13fbddc8ea7de1f5ca149d07eb
parente3fdc71bcb6ffe1d4870a89252ba296a9558e294
net/mlx5e: CT: Fix queued up restore put() executing after relevant ft release

__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>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c