]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5: Fix not releasing read lock when adding flow rules
authorRoi Dayan <roid@mellanox.com>
Sun, 19 Aug 2018 05:56:09 +0000 (08:56 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 6 Sep 2018 00:08:33 +0000 (17:08 -0700)
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: c3b2221ab081 ("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>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

index f418541af7cf13f96ea24613648150bb727397be..384b560f2a9328116168e87b66605ddf65cd2151 100644 (file)
@@ -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);
        }