Author: alfred Date: Sun Oct 20 21:21:50 2013 New Revision: 256810 URL: http://svnweb.freebsd.org/changeset/base/256810
Log: Fix resource free. The order of releasing resources in mlxen was wrong, which caused panic on reload of the module. MFC: 256682 Submitted by: Shahar Klein (shahark at mellanox.com) Approved by: re Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Oct 20 21:21:07 2013 (r256809) +++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Oct 20 21:21:50 2013 (r256810) @@ -927,9 +927,6 @@ void mlx4_en_destroy_netdev(struct net_d if (priv->allocated) mlx4_free_hwq_res(mdev->dev, &priv->res, MLX4_EN_PAGE_SIZE); - if (priv->sysctl) - sysctl_ctx_free(&priv->conf_ctx); - mutex_lock(&mdev->state_lock); mlx4_en_stop_port(dev); mutex_unlock(&mdev->state_lock); @@ -946,6 +943,9 @@ void mlx4_en_destroy_netdev(struct net_d mlx4_en_free_resources(priv); + if (priv->sysctl) + sysctl_ctx_free(&priv->conf_ctx); + mtx_destroy(&priv->stats_lock.m); mtx_destroy(&priv->vlan_lock.m); kfree(priv); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"