All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: wan: farsync: Disable PCI device on removal
@ 2026-09-15  1:59 Myeonghun Pak
  2026-09-15  2:19 ` Chenguang Zhao
  2026-09-17  2:10 ` Jakub Kicinski
  0 siblings, 2 replies; 3+ messages in thread
From: Myeonghun Pak @ 2026-09-15  1:59 UTC (permalink / raw)
  To: Kevin Curtis
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-kernel, stable

fst_add_one() enables the PCI device and disables it on probe failures,
but fst_remove_one() never releases the successful probe's enable
reference. Disable the PCI device after the existing interrupt, tasklet,
mapping and DMA cleanup has completed.

This issue is already present in the initial Git import; its pre-Git
introduction is unknown.

This issue was identified during our ongoing static-analysis research
while reviewing kernel code.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
 drivers/net/wan/farsync.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index 6508c53..0ea6372 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -2561,6 +2561,7 @@ fst_remove_one(struct pci_dev *pdev)
 				  card->tx_dma_handle_card);
 	}
 	fst_card_array[card->card_no] = NULL;
+	pci_disable_device(pdev);
 	kfree(card);
 }
 

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

end of thread, other threads:[~2026-09-17  2:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15  1:59 [PATCH net] net: wan: farsync: Disable PCI device on removal Myeonghun Pak
2026-09-15  2:19 ` Chenguang Zhao
2026-09-17  2:10 ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.