]> git.baikalelectronics.ru Git - kernel.git/commit
octeon_ep: cancel tx_timeout_task later in remove sequence
authorMichal Schmidt <mschmidt@redhat.com>
Thu, 10 Aug 2023 15:01:12 +0000 (17:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Aug 2023 15:52:34 +0000 (17:52 +0200)
commit75c724e2b714215c0c101e1cc301e41001ee234c
tree98f85b80890dd202162f4d2bab28e365e4865e35
parent58a54bad3a7605bf43e86911a570f6a8ab234e70
octeon_ep: cancel tx_timeout_task later in remove sequence

[ Upstream commit 28458c80006bb4e993a09fc094094a8578cad292 ]

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: 862cd659a6fb ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeon_ep/octep_main.c