Skip to content

Commit

Permalink
octeon_ep: cancel ctrl_mbox_task after intr_poll_task
Browse files Browse the repository at this point in the history
[ Upstream commit 607a7a4 ]

intr_poll_task may queue ctrl_mbox_task. The function
octep_poll_non_ioq_interrupts_cn93_pf does this.

When removing the driver and canceling these two works, cancel
ctrl_mbox_task last to guarantee it does not run anymore.

Fixes: 24d4333 ("octeon_ep: poll for control messages")
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Link: https://lore.kernel.org/r/20230810150114.107765-4-mschmidt@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
michich authored and gregkh committed Aug 23, 2023
1 parent 1c5cc17 commit 067a5ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/marvell/octeon_ep/octep_main.c
Expand Up @@ -1200,14 +1200,14 @@ static void octep_remove(struct pci_dev *pdev)
if (!oct)
return;

cancel_work_sync(&oct->ctrl_mbox_task);
netdev = oct->netdev;
if (netdev->reg_state == NETREG_REGISTERED)
unregister_netdev(netdev);

cancel_work_sync(&oct->tx_timeout_task);
oct->poll_non_ioq_intr = false;
cancel_delayed_work_sync(&oct->intr_poll_task);
cancel_work_sync(&oct->ctrl_mbox_task);
octep_device_cleanup(oct);
pci_release_mem_regions(pdev);
free_netdev(netdev);
Expand Down

0 comments on commit 067a5ec

Please sign in to comment.