summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEugenia Emantayev <eugenia@mellanox.com>2016-10-27 16:27:18 +0300
committerDavid S. Miller <davem@davemloft.net>2016-10-29 16:23:48 -0400
commit9d2afba058722d40cc02f430229c91611c0e8d16 (patch)
tree69218daecbae4e11931035cf949e1532f3d340f1 /drivers
parent8d59de8f7bb3db296331c665779c653b0c8d13ba (diff)
downloadlinux-9d2afba058722d40cc02f430229c91611c0e8d16.tar.bz2
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: c27a02cd94d6 ("mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC") Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index e25c11dff525..314f54c8dbed 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -2201,6 +2201,7 @@ void mlx4_en_destroy_netdev(struct net_device *dev)
if (!shutdown)
free_netdev(dev);
+ dev->ethtool_ops = NULL;
}
static int mlx4_en_change_mtu(struct net_device *dev, int new_mtu)