From 35c46ad4062e1cffb1bc2df6e44b4cc75000e119 Mon Sep 17 00:00:00 2001 From: Alaa Hleihel Date: Mon, 1 Jun 2020 15:40:40 -0400 Subject: [PATCH 287/312] [netdrv] net/mlx5: Annotate mutex destroy for root ns Message-id: <20200601154102.25980-18-ahleihel@redhat.com> Patchwork-id: 315722 Patchwork-instance: patchwork O-Subject: [RHEL8.3 BZ 1842258 17/39] net/mlx5: Annotate mutex destroy for root ns Bugzilla: 1842258 1840408 RH-Acked-by: Honggang Li RH-Acked-by: Kamal Heib RH-Acked-by: Marcelo Leitner RH-Acked-by: Jarod Wilson Bugzilla: http://bugzilla.redhat.com/1842258 Bugzilla: http://bugzilla.redhat.com/1840408 Upstream: v5.7-rc7 commit 9ca415399dae133b00273a4283ef31d003a6818d Author: Roi Dayan Date: Thu May 14 23:44:38 2020 +0300 net/mlx5: Annotate mutex destroy for root ns Invoke mutex_destroy() to catch any errors. Fixes: 2cc43b494a6c ("net/mlx5_core: Managing root flow table") Signed-off-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed Signed-off-by: Alaa Hleihel Signed-off-by: Frantisek Hrbata --- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index 6343d5df787d..cbf8126242fc 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -2358,6 +2358,12 @@ static int init_root_tree(struct mlx5_flow_steering *steering, static void del_sw_root_ns(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); } -- 2.13.6