mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
a6d3a5ba3e
commit
6ef5a92cdf
1 changed files with 1 additions and 2 deletions
|
|
@ -12838,8 +12838,7 @@ static void __bnx2x_remove(struct pci_dev *pdev,
|
|||
unregister_netdev(dev);
|
||||
} else {
|
||||
rtnl_lock();
|
||||
if (netif_running(dev))
|
||||
bnx2x_close(dev);
|
||||
dev_close(dev);
|
||||
rtnl_unlock();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue