Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b8c5142 authored by Maor Gottlieb's avatar Maor Gottlieb Committed by David S. Miller
Browse files

net/mlx5: Release FTE lock in error flow



Release the FTE lock when adding rule to the FTE has failed.

Fixes: 0fd758d6 ('net/mlx5: Don't unlock fte while still using it')
Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
Reviewed-by: default avatarMark Bloch <markb@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 077b1e80
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}