mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
bnxt_en: Fix regression in workqueue cleanup logic in bnxt_remove_one().
[ Upstream commit 21d6a11e2cadfb8446265a3efff0e2aad206e15e ]
A recent patch has moved the workqueue cleanup logic before
calling unregister_netdev() in bnxt_remove_one(). This caused a
regression because the workqueue can be restarted if the device is
still open. Workqueue cleanup must be done after unregister_netdev().
The workqueue will not restart itself after the device is closed.
Call bnxt_cancel_sp_work() after unregister_netdev() and
call bnxt_dl_fw_reporters_destroy() after that. This fixes the
regession and the original NULL ptr dereference issue.
Fixes: b16939b59cc0 ("bnxt_en: Fix NULL ptr dereference crash in bnxt_fw_reset_task()")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
aa4dba4e22
commit
b1b5efe574
1 changed files with 3 additions and 2 deletions
|
|
@ -11396,13 +11396,14 @@ static void bnxt_remove_one(struct pci_dev *pdev)
|
|||
if (BNXT_PF(bp))
|
||||
bnxt_sriov_disable(bp);
|
||||
|
||||
pci_disable_pcie_error_reporting(pdev);
|
||||
unregister_netdev(dev);
|
||||
clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state);
|
||||
/* Flush any pending tasks */
|
||||
bnxt_cancel_sp_work(bp);
|
||||
bp->sp_event = 0;
|
||||
|
||||
bnxt_dl_fw_reporters_destroy(bp, true);
|
||||
pci_disable_pcie_error_reporting(pdev);
|
||||
unregister_netdev(dev);
|
||||
bnxt_dl_unregister(bp);
|
||||
bnxt_shutdown_tc(bp);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue