]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:39:21 +0000 (08:39 +0200)
[ Upstream commit 071304772fc747d5df13c51f1cf48a4b922a5e0d ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

index 6ddb2565884d5372ebfbe814baca6279da68e60b..8df9132896d638034616c200a09b566ad0bf4215 100644 (file)
@@ -1797,6 +1797,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);
        }