diff options
author | Maor Gottlieb <maorg@mellanox.com> | 2016-12-28 14:58:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-28 14:36:51 -0500 |
commit | 9b8c514291a83e53c073b473bdca6267f17a02c2 (patch) | |
tree | 8e37c77f6ca048fb0d9955bc1405b23d3f78acfc /drivers/net | |
parent | 077b1e8069b9b74477b01d28f6b83774dc19a142 (diff) |
net/mlx5: Release FTE lock in error flow
Release the FTE lock when adding rule to the FTE has failed.
Fixes: 0fd758d6112f ('net/mlx5: Don't unlock fte while still using it')
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index a263d8904a4c..0ac7a2fc916c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -1263,6 +1263,7 @@ static struct mlx5_flow_handle *add_rule_fg(struct mlx5_flow_group *fg, nested_lock_ref_node(&fte->node, FS_MUTEX_CHILD); handle = add_rule_fte(fte, fg, dest, dest_num, false); if (IS_ERR(handle)) { + unlock_ref_node(&fte->node); kfree(fte); goto unlock_fg; } |