提交 9d2afba0 编写于 作者: E Eugenia Emantayev 提交者: David S. Miller

net/mlx4_en: Fix panic during reboot

Fix a kernel panic that occurs as a result of an asynchronous event
handled in roce_gid_mgmt:
mlx4_en_get_drvinfo is called and accesses freed resources.

This happens in a shutdown flow only, since pci device is destroyed
while netdevice is still alive.

Fixes: c27a02cd ("mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC")
Signed-off-by: NEugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8d59de8f
...@@ -2201,6 +2201,7 @@ void mlx4_en_destroy_netdev(struct net_device *dev) ...@@ -2201,6 +2201,7 @@ void mlx4_en_destroy_netdev(struct net_device *dev)
if (!shutdown) if (!shutdown)
free_netdev(dev); free_netdev(dev);
dev->ethtool_ops = NULL;
} }
static int mlx4_en_change_mtu(struct net_device *dev, int new_mtu) static int mlx4_en_change_mtu(struct net_device *dev, int new_mtu)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册