mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net] net: fm10k: shut down the service timer during removal
@ 2026-10-04 11:43 Runyu Xiao
  2026-10-05 10:23 ` Loktionov, Aleksandr
  2026-10-06 22:08 ` Jacob Keller
  0 siblings, 2 replies; 3+ messages in thread
From: Runyu Xiao @ 2026-10-04 11:43 UTC (permalink / raw)
  To: Tony Nguyen, Przemek Kitszel
  Cc: Jacob Keller, Matthew Vick, Andrew Lunn, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, intel-wired-lan,
	netdev, linux-kernel, stable, Runyu Xiao, Jianhao Xu

The fm10k service timer rearms itself from its callback. During PCI
removal, timer_delete_sync() waits for a running callback but does not
prevent a callback or another service path from rearming the timer. This
can leave the timer referencing the fm10k_intfc after free_netdev().

Use timer_shutdown_sync() to permanently prevent rearming before teardown
continues.

The issue was identified by code inspection. No runtime reproduction or
trace demonstrating the failure is available.

The patch was not tested on real hardware. No hardware- or
firmware-specific runtime result is available. Validation used source
review and available build or emulation checks.

Fixes: 54b3c9cfad6b ("fm10k: start service timer on probe")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
---
 drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index f5b4d0627..836664cfd 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -2245,7 +2245,7 @@ static void fm10k_remove(struct pci_dev *pdev)
 	struct fm10k_intfc *interface = pci_get_drvdata(pdev);
 	struct net_device *netdev = interface->netdev;
 
-	timer_delete_sync(&interface->service_timer);
+	timer_shutdown_sync(&interface->service_timer);
 
 	fm10k_stop_service_event(interface);
 	fm10k_stop_macvlan_task(interface);
-- 
2.34.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-06 22:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-04 11:43 [PATCH net] net: fm10k: shut down the service timer during removal Runyu Xiao
2026-10-05 10:23 ` Loktionov, Aleksandr
2026-10-06 22:08 ` Jacob Keller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®