]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net/mlx5: Annotate mutex destroy for root ns
authorRoi Dayan <roid@mellanox.com>
Thu, 14 May 2020 20:44:38 +0000 (23:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jun 2020 06:22:55 +0000 (08:22 +0200)
commit 9ca415399dae133b00273a4283ef31d003a6818d upstream.

Invoke mutex_destroy() to catch any errors.

Fixes: 2cc43b494a6c ("net/mlx5_core: Managing root flow table")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Mark Bloch <markb@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 cdc566768a07e08e2c4b0298d8d9dd821f97fff4..cf09cfc33234354b81f95454b5da06f9de0ae096 100644 (file)
@@ -416,6 +416,12 @@ static void del_sw_ns(struct fs_node *node)
 
 static void del_sw_prio(struct fs_node *node)
 {
+       struct mlx5_flow_root_namespace *root_ns;
+       struct mlx5_flow_namespace *ns;
+
+       fs_get_obj(ns, node);
+       root_ns = container_of(ns, struct mlx5_flow_root_namespace, ns);
+       mutex_destroy(&root_ns->chain_lock);
        kfree(node);
 }