From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: arina.kharlamova@mbzuai.ac.ae
Cc: Jiri Slaby <jirislaby@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] tty: serial: ip22zilog: Free the interrupt on unbind
Date: Tue, 1 Dec 2026 21:07:16 +0100 [thread overview]
Message-ID: <2026120132-coastal-mossy-280c@gregkh> (raw)
In-Reply-To: <20261201-s2p-d26-v1-1-a39b4ded58a6@mbzuai.ac.ae>
On Tue, Dec 01, 2026 at 11:20:52PM +0400, Arina Kharlamova via B4 Relay wrote:
> From: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>
>
> ip22zilog_probe() requests the interrupt with request_irq(), and
> nothing frees it. After the driver is unbound the handler stays
> installed, and the next probe fails to request the interrupt and
> calls panic().
>
> Request the interrupt with devm_request_irq(), so it is freed when the
> driver is unbound.
Then don't call unbound :)
>
> Fixes: 3fc36ae6abd2 ("tty: serial: ip22zilog: Use platform device for probing")
> Cc: stable@vger.kernel.org
> Signed-off-by: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>
> ---
> The interrupt is never freed, so binding the driver again panics.
>
> I found this with spec2patch. It has formal specifications of kernel APIs
> such as devres, runtime PM, clocks and locks. Each one says what a call
> acquires and releases and what a driver has to undo on the error and
> remove paths. I checked this driver against them. With the help of an AI
> coding assistant (Claude); I reviewed the analysis and the fix.
> Compile-tested only, not tested on hardware.
Please test on real hardware, devm_request_irq() has BAD side affects if
used incorrectly.
greg k-h
prev parent reply other threads:[~2026-12-01 20:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 19:20 [PATCH] tty: serial: ip22zilog: Free the interrupt on unbind Arina Kharlamova via B4 Relay
2026-12-01 19:35 ` sashiko-bot
2026-12-01 20:07 ` 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=2026120132-coastal-mossy-280c@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=arina.kharlamova@mbzuai.ac.ae \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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