Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2019 17:17:53 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r347806 - stable/11/sys/dev/mlx5/mlx5_en
Message-ID:  <201905161717.x4GHHr5O099222@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Thu May 16 17:17:52 2019
New Revision: 347806
URL: https://svnweb.freebsd.org/changeset/base/347806

Log:
  MFC r347256:
  Destroy port stats debug context in correct order in mlx5en(4).
  Destroy children nodes before parent nodes.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
  stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
==============================================================================
--- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c	Thu May 16 17:17:12 2019	(r347805)
+++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c	Thu May 16 17:17:52 2019	(r347806)
@@ -1063,6 +1063,10 @@ mlx5e_ethtool_debug_stats(SYSCTL_HANDLER_ARGS)
 	int error;
 
 	PRIV_LOCK(priv);
+	if (priv->gone != 0) {
+		error = ENODEV;
+		goto done;
+	}
 	sys_debug = priv->sysctl_debug;
 	error = sysctl_handle_int(oidp, &sys_debug, 0, req);
 	if (error != 0 || !req->newptr)

Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==============================================================================
--- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c	Thu May 16 17:17:12 2019	(r347805)
+++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c	Thu May 16 17:17:52 2019	(r347806)
@@ -3779,9 +3779,9 @@ mlx5e_destroy_ifp(struct mlx5_core_dev *mdev, void *vp
 	/* destroy all remaining sysctl nodes */
 	sysctl_ctx_free(&priv->stats.vport.ctx);
 	sysctl_ctx_free(&priv->stats.pport.ctx);
-	sysctl_ctx_free(&priv->sysctl_ctx);
 	if (priv->sysctl_debug)
 		sysctl_ctx_free(&priv->stats.port_stats_debug.ctx);
+	sysctl_ctx_free(&priv->sysctl_ctx);
 
 	mlx5_core_destroy_mkey(priv->mdev, &priv->mr);
 	mlx5_dealloc_transport_domain(priv->mdev, priv->tdn);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905161717.x4GHHr5O099222>