提交 0e03567a 编写于 作者: A Alexander Guller 提交者: David S. Miller

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: NAlexander Guller <alexg@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8d0fc7b6
...@@ -151,6 +151,7 @@ static void mlx4_en_clear_list(struct net_device *dev) ...@@ -151,6 +151,7 @@ static void mlx4_en_clear_list(struct net_device *dev)
struct mlx4_en_priv *priv = netdev_priv(dev); struct mlx4_en_priv *priv = netdev_priv(dev);
kfree(priv->mc_addrs); kfree(priv->mc_addrs);
priv->mc_addrs = NULL;
priv->mc_addrs_cnt = 0; priv->mc_addrs_cnt = 0;
} }
...@@ -170,6 +171,7 @@ static void mlx4_en_cache_mclist(struct net_device *dev) ...@@ -170,6 +171,7 @@ static void mlx4_en_cache_mclist(struct net_device *dev)
i = 0; i = 0;
netdev_for_each_mc_addr(ha, dev) netdev_for_each_mc_addr(ha, dev)
memcpy(mc_addrs + i++ * ETH_ALEN, ha->addr, ETH_ALEN); memcpy(mc_addrs + i++ * ETH_ALEN, ha->addr, ETH_ALEN);
mlx4_en_clear_list(dev);
priv->mc_addrs = mc_addrs; priv->mc_addrs = mc_addrs;
priv->mc_addrs_cnt = mc_addrs_cnt; priv->mc_addrs_cnt = mc_addrs_cnt;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册