Re: [PATCH net] net: wan: farsync: Disable PCI device on removal
From: Chenguang Zhao
Date: Mon Sep 14 2026 - 22:30:50 EST
On Mon, Sep 14, 2026 at 09:59:40PM -0400, Myeonghun Pak wrote:
> 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@xxxxxxxxxxxxxxx
> Assisted-by: LLM
> Co-developed-by: Ijae Kim <ae878000@xxxxxxxxx>
> Signed-off-by: Ijae Kim <ae878000@xxxxxxxxx>
> Signed-off-by: Myeonghun Pak <mhun512@xxxxxxxxx>
> ---
> 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);
> }
>
The patch looks good to me. By the way, the commit message could be a bit more concise.
Reviewed-by: Chenguang Zhao <zhaochenguang@xxxxxxxxxx>
Thanks