mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 06:01:53 +02:00
ionic: cancel delayed work earlier in remove
Cancel any entries on the delayed work queue before starting to tear down the lif to be sure there is no race with any other events. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Joe Damato <joe@dama.to> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c9080abea1
commit
52fdba899e
|
|
@ -409,6 +409,7 @@ static void ionic_remove(struct pci_dev *pdev)
|
|||
timer_shutdown_sync(&ionic->watchdog_timer);
|
||||
|
||||
if (ionic->lif) {
|
||||
cancel_work_sync(&ionic->lif->deferred.work);
|
||||
/* prevent adminq cmds if already known as down */
|
||||
if (test_and_clear_bit(IONIC_LIF_F_FW_RESET, ionic->lif->state))
|
||||
set_bit(IONIC_LIF_F_FW_STOPPING, ionic->lif->state);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user