net/mlx5e: CT: Fix memory leak in cleanup
authorEli Britstein <elibr@mellanox.com>
Sun, 28 Jun 2020 12:42:26 +0000 (15:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jul 2020 06:13:25 +0000 (08:13 +0200)
commit55dda1a8f4dfb71f0ead5bc8527f884bcd697894
tree2715b029c112dbbdc7b838752addafc9011b59dc
parentf1d02b8995fba061c1d07fa93b291f348d1d6335
net/mlx5e: CT: Fix memory leak in cleanup

[ Upstream commit eb32b3f53d283e8d68b6d86c3a6ed859b24dacae ]

CT entries are deleted via a workqueue from netfilter. If removing the
module before that, the rules are cleaned by the driver itself, but the
memory entries for them are not freed. Fix that.

Fixes: ac991b48d43c ("net/mlx5e: CT: Offload established flows")
Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c