mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
staging: octeon: add missing tasklet_kill in cvm_oct_tx_shutdown
The TX cleanup tasklet can be scheduled by the watchdog IRQ handler
to execute cvm_oct_tx_do_cleanup. There can be a pending tasklet in
the queue which might run after the cvm_oct_remove() frees net_device
structures, causing a use-after-free in cvm_oct_tx_do_cleanup() as it
iterates cvm_oct_device[] which is an array of netdevice pointers.
Add tasklet_kill() after free_irq() to ensure the tasklet is no longer
scheduled or running before teardown proceeds.
Fixes: 4898c56010 ("Staging: Octeon: Free transmit SKBs in a timely manner")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260511150931.93382-1-ayushmukkanwar%40gmail.com
Signed-off-by: Ayush Mukkanwar <ayushmukkanwar@gmail.com>
Link: https://patch.msgid.link/20260615172734.42038-1-ayushmukkanwar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d1760cc87c
commit
b9af44b0d2
|
|
@ -668,4 +668,6 @@ void cvm_oct_tx_shutdown(void)
|
|||
{
|
||||
/* Free the interrupt handler */
|
||||
free_irq(OCTEON_IRQ_TIMER1, cvm_oct_device);
|
||||
|
||||
tasklet_kill(&cvm_oct_tx_cleanup_tasklet);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user