提交 6ef5a92c 编写于 作者: Y Yuval Mintz 提交者: David S. Miller

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: NYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: NDmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: NAriel Elior <ariele@broadcom.com>
Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a6d3a5ba
......@@ -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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册