]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 22 Jun 2022 12:23:16 +0000 (14:23 +0200)
commitc6c162a3969a4609279d1378983241eb901ee883
tree739cafd2fb4bfc02494aa5d762100a017c44778d
parent6182930e900cda943dfd60c046cb1c21b8a4df84
net/mlx5e: CT: Fix queued up restore put() executing after relevant ft release

BugLink: https://bugs.launchpad.net/bugs/1978240
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c