Author: alfred Date: Thu Oct 17 12:19:36 2013 New Revision: 256682 URL: http://svnweb.freebsd.org/changeset/base/256682
Log: Fix resource free. The order of releasing resources in mlxen was wrong, which caused panic on reload of the module. conf_ctx list should be released before stat_ctx list, otherwise the leafs in conf_ctx list won't be released because of the dependancy. The fix is to change the order of the releases. Submitted by: Shahar Klein (shahark at mellanox.com) Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Oct 17 12:15:21 2013 (r256681) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Oct 17 12:19:36 2013 (r256682) @@ -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"