Skip to content

Commit 28458c8

Browse files
michichkuba-moo
authored andcommitted
octeon_ep: cancel tx_timeout_task later in remove sequence
tx_timeout_task is canceled too early when removing the driver. Nothing prevents .ndo_tx_timeout from triggering and queuing the work again. Better cancel it after the netdev is unregistered. It's harmless for octep_tx_timeout_task to run in the window between the unregistration and cancelation, because it checks netif_running. Fixes: 862cd65 ("octeon_ep: Add driver framework and device initialization") Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Link: https://lore.kernel.org/r/20230810150114.107765-3-mschmidt@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 519b227 commit 28458c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/marvell/octeon_ep/octep_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,12 +1200,12 @@ static void octep_remove(struct pci_dev *pdev)
12001200
if (!oct)
12011201
return;
12021202

1203-
cancel_work_sync(&oct->tx_timeout_task);
12041203
cancel_work_sync(&oct->ctrl_mbox_task);
12051204
netdev = oct->netdev;
12061205
if (netdev->reg_state == NETREG_REGISTERED)
12071206
unregister_netdev(netdev);
12081207

1208+
cancel_work_sync(&oct->tx_timeout_task);
12091209
oct->poll_non_ioq_intr = false;
12101210
cancel_delayed_work_sync(&oct->intr_poll_task);
12111211
octep_device_cleanup(oct);

0 commit comments

Comments
 (0)