svn commit: r347806 - stable/11/sys/dev/mlx5/mlx5_en

Hans Petter Selasky hselasky at FreeBSD.org
Thu May 16 17:17:54 UTC 2019


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);


More information about the svn-src-all mailing list