]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ionic: cancel delayed work earlier in remove
authorShannon Nelson <shannon.nelson@amd.com>
Mon, 9 Jun 2025 21:46:44 +0000 (14:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Jun 2025 09:31:06 +0000 (10:31 +0100)
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>
drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c

index 4c377bdc62c80fb6b6329ff7552790c45cb0cad3..136bfa3516d0027ce94fd8b54dd6e4c2e00975f1 100644 (file)
@@ -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);