Commit 52fdba89 authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller
Browse files

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: default avatarShannon Nelson <shannon.nelson@amd.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Reviewed-by: default avatarJoe Damato <joe@dama.to>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c9080abe
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);