]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix modify header actions memory leak
authorMaor Dickman <maord@nvidia.com>
Wed, 30 Sep 2020 13:31:11 +0000 (16:31 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 5 Nov 2020 20:17:05 +0000 (12:17 -0800)
commit18c1ff7a674e0cbfbeb1e181fbc5fe23399d0685
tree41f9e6d18c73824825d903ebb259139709447ffc
parent4b0d63d6dde2a2378538a6ba8322a297f13854c7
net/mlx5e: Fix modify header actions memory leak

Modify header actions are allocated during parse tc actions and only
freed during the flow creation, however, on error flow the allocated
memory is wrongly unfreed.

Fix this by calling dealloc_mod_hdr_actions in __mlx5e_add_fdb_flow
and mlx5e_add_nic_flow error flow.

Fixes: 3a69c7dedbe4 ("net/mlx5e: Add offloading of E-Switch TC pedit (header re-write) actions")
Fixes: dbf787a093bb ("net/mlx5e: Add offloading of NIC TC pedit (header re-write) actions")
Signed-off-by: Maor Dickman <maord@nvidia.com>
Reviewed-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c