netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>, kuba@kernel.org
Cc: netdev@vger.kernel.org, Roi Dayan <roid@mellanox.com>,
	Mark Bloch <markb@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 10/13] net/mlx5: Annotate mutex destroy for root ns
Date: Fri, 22 May 2020 17:40:46 -0700	[thread overview]
Message-ID: <20200523004049.34832-11-saeedm@mellanox.com> (raw)
In-Reply-To: <20200523004049.34832-1-saeedm@mellanox.com>

From: Roi Dayan <roid@mellanox.com>

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>
---
 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 02d0f94eaaad..9620c8650e13 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -2350,6 +2350,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.25.4


  parent reply	other threads:[~2020-05-23  0:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-23  0:40 [pull request][net 00/13] mlx5 fixes 2020-05-22 Saeed Mahameed
2020-05-23  0:40 ` [net 01/13] net/mlx5: Add command entry handling completion Saeed Mahameed
2020-05-23  0:40 ` [net 02/13] net/mlx5: Fix a race when moving command interface to events mode Saeed Mahameed
2020-05-23  0:40 ` [net 03/13] net/mlx5: Avoid processing commands before cmdif is ready Saeed Mahameed
2020-05-23  0:40 ` [net 04/13] net/mlx5e: Fix allowed tc redirect merged eswitch offload cases Saeed Mahameed
2020-05-23  0:40 ` [net 05/13] net/mlx5e: kTLS, Destroy key object after destroying the TIS Saeed Mahameed
2020-05-23  0:40 ` [net 06/13] net/mlx5e: Fix inner tirs handling Saeed Mahameed
2020-05-23  0:40 ` [net 07/13] net/mlx5: Fix memory leak in mlx5_events_init Saeed Mahameed
2020-05-23  0:40 ` [net 08/13] net/mlx5: Fix cleaning unmanaged flow tables Saeed Mahameed
2020-05-23  0:40 ` [net 09/13] net/mlx5: Don't maintain a case of del_sw_func being null Saeed Mahameed
2020-05-23  0:40 ` Saeed Mahameed [this message]
2020-05-23  0:40 ` [net 11/13] net/mlx5e: Update netdev txq on completions during closure Saeed Mahameed
2020-05-23  0:40 ` [net 12/13] net/mlx5e: CT: Correctly get flow rule Saeed Mahameed
2020-05-23  0:40 ` [net 13/13] net/mlx5: Fix error flow in case of function_setup failure Saeed Mahameed
2020-05-23 23:47 ` [pull request][net 00/13] mlx5 fixes 2020-05-22 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200523004049.34832-11-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=markb@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=roid@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).