Date: Sun, 20 Oct 2013 21:21:50 +0000 (UTC) From: Alfred Perlstein <alfred@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r256810 - stable/10/sys/ofed/drivers/net/mlx4 Message-ID: <201310202121.r9KLLowW081937@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310202121.r9KLLowW081937>