diff options
author | alfred <alfred@FreeBSD.org> | 2013-10-20 21:21:50 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2013-10-20 21:21:50 +0000 |
commit | 514a2c2eaae634f1b2dfb3644838d92fa2916acb (patch) | |
tree | e411452052fd52b8aa428b288e4d07656319aac8 /sys/ofed | |
parent | b36ea7524500e7b946ee61a3d580644d0e9320cd (diff) | |
download | FreeBSD-src-514a2c2eaae634f1b2dfb3644838d92fa2916acb.zip FreeBSD-src-514a2c2eaae634f1b2dfb3644838d92fa2916acb.tar.gz |
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
Diffstat (limited to 'sys/ofed')
-rw-r--r-- | sys/ofed/drivers/net/mlx4/en_netdev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ofed/drivers/net/mlx4/en_netdev.c b/sys/ofed/drivers/net/mlx4/en_netdev.c index f7167d9..fd7a189 100644 --- a/sys/ofed/drivers/net/mlx4/en_netdev.c +++ b/sys/ofed/drivers/net/mlx4/en_netdev.c @@ -927,9 +927,6 @@ void mlx4_en_destroy_netdev(struct net_device *dev) 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_device *dev) 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); |