Message ID | 20201105202129.23644-2-saeedm@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | e68e28b4a9d71261e3f8fd05a72d6cf0b443a493 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,v2,1/7] net/mlx5e: Fix modify header actions memory leak | expand |
Hello: This series was applied to netdev/net.git (refs/heads/master): On Thu, 5 Nov 2020 12:21:23 -0800 you wrote: > From: Maor Dickman <maord@nvidia.com> > > 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. > > [...] Here is the summary with links: - [net,v2,1/7] net/mlx5e: Fix modify header actions memory leak https://git.kernel.org/netdev/net/c/e68e28b4a9d7 - [net,v2,2/7] net/mlx5e: Protect encap route dev from concurrent release https://git.kernel.org/netdev/net/c/78c906e430b1 - [net,v2,3/7] net/mlx5e: Use spin_lock_bh for async_icosq_lock https://git.kernel.org/netdev/net/c/f42139ba4979 - [net,v2,4/7] net/mlx5: Fix deletion of duplicate rules https://git.kernel.org/netdev/net/c/465e7baab6d9 - [net,v2,5/7] net/mlx5: E-switch, Avoid extack error log for disabled vport https://git.kernel.org/netdev/net/c/ae3585944560 - [net,v2,6/7] net/mlx5e: Fix VXLAN synchronization after function reload https://git.kernel.org/netdev/net/c/c5eb51adf06b - [net,v2,7/7] net/mlx5e: Fix incorrect access of RCU-protected xdp_prog https://git.kernel.org/netdev/net/c/1a50cf9a67ff You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index e3a968e9e2a0..2e2fa0440032 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -4658,6 +4658,7 @@ __mlx5e_add_fdb_flow(struct mlx5e_priv *priv, return flow; err_free: + dealloc_mod_hdr_actions(&parse_attr->mod_hdr_acts); mlx5e_flow_put(priv, flow); out: return ERR_PTR(err); @@ -4802,6 +4803,7 @@ mlx5e_add_nic_flow(struct mlx5e_priv *priv, return 0; err_free: + dealloc_mod_hdr_actions(&parse_attr->mod_hdr_acts); mlx5e_flow_put(priv, flow); out: return err;