2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/net/ethernet/marvell/octeon_ep
Michal Schmidt 758c910781 octeon_ep: cancel queued works in probe error path
If it fails to get the devices's MAC address, octep_probe exits while
leaving the delayed work intr_poll_task queued. When the work later
runs, it's a use after free.

Move the cancelation of intr_poll_task from octep_remove into
octep_device_cleanup. This does not change anything in the octep_remove
flow, but octep_device_cleanup is called also in the octep_probe error
path, where the cancelation is needed.

Note that the cancelation of ctrl_mbox_task has to follow
intr_poll_task's, because the ctrl_mbox_task may be queued by
intr_poll_task.

Fixes: 24d4333233 ("octeon_ep: poll for control messages")
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Link: https://lore.kernel.org/r/20230810150114.107765-5-mschmidt@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-08-14 19:08:13 -07:00
..
Kconfig
Makefile octeon_ep: add ethtool support for Octeon PCI Endpoint NIC 2022-04-13 12:56:32 +01:00
octep_cn9k_pf.c octeon_ep: add heartbeat monitor 2023-03-27 08:37:54 +01:00
octep_config.h octeon_ep: add heartbeat monitor 2023-03-27 08:37:54 +01:00
octep_ctrl_mbox.c octeon_ep: initialize mbox mutexes 2023-07-31 14:31:26 -07:00
octep_ctrl_mbox.h octeon_ep: add separate mailbox command and response queues 2023-03-27 08:37:54 +01:00
octep_ctrl_net.c octeon_ep: fix timeout value for waiting on mbox response 2023-08-14 19:08:13 -07:00
octep_ctrl_net.h octeon_ep: function id in link info and stats mailbox commands 2023-03-27 08:37:54 +01:00
octep_ethtool.c octeon_ep: function id in link info and stats mailbox commands 2023-03-27 08:37:54 +01:00
octep_main.c octeon_ep: cancel queued works in probe error path 2023-08-14 19:08:13 -07:00
octep_main.h octeon_ep: add heartbeat monitor 2023-03-27 08:37:54 +01:00
octep_regs_cn9k_pf.h octeon_ep: add heartbeat monitor 2023-03-27 08:37:54 +01:00
octep_rx.c octeon_ep: use vmalloc_array and vcalloc 2023-06-27 09:30:23 -07:00
octep_rx.h
octep_tx.c octeon_ep: delete unnecessary NULL check 2022-05-16 11:40:04 +01:00
octep_tx.h