]> Git Repo - linux.git/commitdiff
net/mlx5e: CT: Fix memory leak in cleanup
authorEli Britstein <[email protected]>
Sun, 28 Jun 2020 12:42:26 +0000 (15:42 +0300)
committerSaeed Mahameed <[email protected]>
Fri, 10 Jul 2020 02:27:07 +0000 (19:27 -0700)
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 <[email protected]>
Reviewed-by: Roi Dayan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c

index 430025550fad2ba7c222dc4b0ae5c81ec8211d2d..aad1c29b23db102e0f858327e7769c3cc445f0ac 100644 (file)
@@ -1097,6 +1097,7 @@ mlx5_tc_ct_flush_ft_entry(void *ptr, void *arg)
        struct mlx5_ct_entry *entry = ptr;
 
        mlx5_tc_ct_entry_del_rules(ct_priv, entry);
+       kfree(entry);
 }
 
 static void
This page took 0.060208 seconds and 4 git commands to generate.