* [PATCH] net: wan: farsync: disable PCI device on removal
@ 2026-09-16 6:31 Guangshuo Li
2026-09-18 23:55 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Guangshuo Li @ 2026-09-16 6:31 UTC (permalink / raw)
To: Kevin Curtis, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
Cc: Guangshuo Li, stable
fst_add_one() calls pci_enable_device() to enable the PCI device. The
probe failure paths call pci_disable_device() to release the matching
enable reference, but fst_remove_one() does not disable the device
after a successful probe.
As a result, the PCI device enable reference remains unbalanced after
the driver is removed.
Call pci_disable_device() after the existing interrupt, tasklet,
mapping, DMA and PCI region cleanup to release the enable reference.
This issue was found by manual code inspection.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@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 6508c53bdc24..0ea637270ad7 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);
}
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] net: wan: farsync: disable PCI device on removal
2026-09-16 6:31 [PATCH] net: wan: farsync: disable PCI device on removal Guangshuo Li
@ 2026-09-18 23:55 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2026-09-18 23:55 UTC (permalink / raw)
To: Guangshuo Li
Cc: Kevin Curtis, Andrew Lunn, David S. Miller, Eric Dumazet,
Paolo Abeni, netdev, linux-kernel, stable
On Wed, 16 Sep 2026 14:31:18 +0800 Guangshuo Li wrote:
> fst_add_one() calls pci_enable_device() to enable the PCI device. The
> probe failure paths call pci_disable_device() to release the matching
> enable reference, but fst_remove_one() does not disable the device
> after a successful probe.
>
> As a result, the PCI device enable reference remains unbalanced after
> the driver is removed.
>
> Call pci_disable_device() after the existing interrupt, tasklet,
> mapping, DMA and PCI region cleanup to release the enable reference.
>
> This issue was found by manual code inspection.
Ancient stuff, no point.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-18 23:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 6:31 [PATCH] net: wan: farsync: disable PCI device on removal Guangshuo Li
2026-09-18 23:55 ` Jakub Kicinski
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®