mirror of https://gitee.com/openkylin/linux.git
bnx2x: prevent crash in shutdown flow with CNIC
There might be a crash as during shutdown flow CNIC might try to access resources already freed by bnx2x. Change bnx2x_close() into dev_close() in __bnx2x_remove (shutdown flow) to guarantee CNIC is notified of the device's change of status. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a6d3a5ba3e
commit
6ef5a92cdf
|
@ -12838,8 +12838,7 @@ static void __bnx2x_remove(struct pci_dev *pdev,
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
} else {
|
} else {
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
if (netif_running(dev))
|
dev_close(dev);
|
||||||
bnx2x_close(dev);
|
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue