From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Myeonghun Pak <mhun512@gmail.com>
Cc: Jiri Slaby <jirislaby@kernel.org>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] serial: icom: Disable the PCI device on final adapter release
Date: Wed, 23 Sep 2026 12:18:48 +0200 [thread overview]
Message-ID: <2026092304-splendid-lego-7601@gregkh> (raw)
In-Reply-To: <20260915010000.52974-1-mhun512@gmail.com>
On Mon, Sep 14, 2026 at 08:59:59PM -0400, Myeonghun Pak wrote:
> icom_probe() enables the PCI device, but the final adapter release
> never disables it. Balance the enable after releasing the IRQ, mapping
> and PCI regions, while the adapter's PCI device pointer is still valid.
>
> The imbalance is already present in the initial Git import.
>
> 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/tty/serial/icom.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c
> --- a/drivers/tty/serial/icom.c
> +++ b/drivers/tty/serial/icom.c
> @@ -1691,6 +1691,7 @@ static void icom_kref_release(struct kref *kref)
> free_irq(icom_adapter->pci_dev->irq, (void *) icom_adapter);
> iounmap(icom_adapter->base_addr);
> pci_release_regions(icom_adapter->pci_dev);
> + pci_disable_device(icom_adapter->pci_dev);
Are you sure this is correct? Lots of time disabling the device is not
what you want to do as it can cause hardware problems.
Have you tested this on the hardware? If not, I can't take it for
obvious reasons.
thanks,
greg k-h
prev parent reply other threads:[~2026-09-23 10:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 0:59 Myeonghun Pak
2026-09-23 10:18 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026092304-splendid-lego-7601@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mhun512@gmail.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®