Re: [PATCH] tty: serial: ip22zilog: Free the interrupt on unbind

From: Arina Kharlamova

Date: Thu Dec 03 2026 - 06:27:21 EST


> Then don't call unbound :)
>
> Please test on real hardware, devm_request_irq() has BAD side affects if
> used incorrectly.

Fair enough. I do not have IP22 hardware to test this on, and the
review bot also pointed at an ordering problem between the interrupt
and the port teardown with devm_request_irq(). Please drop this patch.

Our formal verification tool spec2patch is still in development, that’s why sometimes can be mistakes, I am very sorry, I will verify kernel models and proof in order to support such cases.

Thanks,
Arina


> On 2 Dec 2026, at 00:07, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Notice: This email originated from outside MBZUAI.
> Please exercise caution before clicking links, opening attachments, or sharing sensitive information.
> On Tue, Dec 01, 2026 at 11:20:52PM +0400, Arina Kharlamova via B4 Relay wrote:
> > From: Arina Kharlamova <arina.kharlamova@xxxxxxxxxxxx>
> >
> > 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@xxxxxxxxxxxxxxx
> > Signed-off-by: Arina Kharlamova <arina.kharlamova@xxxxxxxxxxxx>
> > ---
> > 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
>