diff options
author | Alexander Guller | 2011-12-19 04:02:58 +0000 |
---|---|---|
committer | David S. Miller | 2011-12-19 14:57:07 -0500 |
commit | 0e03567a2c2542e142d5ab6c8bcbf6373a241afe (patch) | |
tree | b478d2213c255be3b75af162379cae93fafd6455 | |
parent | 8d0fc7b61191c9433a4f738987b89e1d962eb637 (diff) |
mlx4_en: nullify cached multicast address list after cleanup
Solves an issue where we tried to free the same page twice after
the port has been opened and closed.
Signed-off-by: Alexander Guller <alexg@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index 1db6fea495bf..72fa807b69ce 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c @@ -151,6 +151,7 @@ static void mlx4_en_clear_list(struct net_device *dev) struct mlx4_en_priv *priv = netdev_priv(dev); kfree(priv->mc_addrs); + priv->mc_addrs = NULL; priv->mc_addrs_cnt = 0; } @@ -170,6 +171,7 @@ static void mlx4_en_cache_mclist(struct net_device *dev) i = 0; netdev_for_each_mc_addr(ha, dev) memcpy(mc_addrs + i++ * ETH_ALEN, ha->addr, ETH_ALEN); + mlx4_en_clear_list(dev); priv->mc_addrs = mc_addrs; priv->mc_addrs_cnt = mc_addrs_cnt; } |