svn commit: r347256 - head/sys/dev/mlx5/mlx5_en
Hans Petter Selasky
hselasky at FreeBSD.org
Wed May 8 10:32:24 UTC 2019
Author: hselasky
Date: Wed May 8 10:32:22 2019
New Revision: 347256
URL: https://svnweb.freebsd.org/changeset/base/347256
Log:
Destroy port stats debug context in correct order in mlx5en(4).
Destroy children nodes before parent nodes.
MFC after: 3 days
Sponsored by: Mellanox Technologies
Modified:
head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed May 8 10:32:03 2019 (r347255)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Wed May 8 10:32:22 2019 (r347256)
@@ -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: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed May 8 10:32:03 2019 (r347255)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed May 8 10:32:22 2019 (r347256)
@@ -4089,9 +4089,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