aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorRoi Dayan <roid@mellanox.com>2018-08-19 08:56:09 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2018-09-05 17:08:33 -0700
commit071304772fc747d5df13c51f1cf48a4b922a5e0d (patch)
tree085912ca0e9a14f7025b22b7a57fbcf1a8e12ad4 /drivers/net/ethernet
parentnet/mlx5: E-Switch, Fix memory leak when creating switchdev mode FDB tables (diff)
downloadlinux-dev-071304772fc747d5df13c51f1cf48a4b922a5e0d.tar.xz
linux-dev-071304772fc747d5df13c51f1cf48a4b922a5e0d.zip
net/mlx5: Fix not releasing read lock when adding flow rules
If building match list fg fails and we never jumped to search_again_locked label then the function returned without unlocking the read lock. Fixes: bd71b08ec2ee ("net/mlx5: Support multiple updates of steering rules in parallel") Signed-off-by: Roi Dayan <roid@mellanox.com> Reviewed-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/fs_core.c2
1 files changed, 2 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 f418541af7cf..384b560f2a93 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -1726,6 +1726,8 @@ search_again_locked:
if (err) {
if (take_write)
up_write_ref_node(&ft->node);
+ else
+ up_read_ref_node(&ft->node);
return ERR_PTR(err);
}