Re: [PATCH 02/28] mfd: ls2kbmc: Unregister GPIO GSI via devm_add_action_or_reset()

From: Lee Jones

Date: Wed Oct 21 2026 - 12:48:59 EST


On Wed, 21 Oct 2026, Andy Shevchenko wrote:

> On Wed, Oct 21, 2026 at 12:09:24PM +0000, Lee Jones wrote:
> > ls2k_bmc_init() unconditionally calls acpi_unregister_gsi() immediately
> > after requesting the GPIO interrupt via devm_request_irq(). This
> > prematurely disposes of the active IRQ mapping while the interrupt
> > handler remains registered, breaking the GPIO watchdog interrupt and
> > causing a use-after-free when devres later frees the disposed IRQ
> > descriptor on probe failure or device unbind.
> >
> > Register a devm_add_action_or_reset() callback before devm_request_irq()
> > so that acpi_unregister_gsi() is invoked only after devres has freed the
> > interrupt.
>
> ...
>
> > Fixes: d952bba3fbb5 ("mfd: ls2kbmc: Add Loongson-2K BMC reset function support")
> > Closes: https://sashiko.dev/#/bug/linux-cab8bfb6-4077-46f3-a173-ac2e2042cf66
>
> Don't we use the official Sachiko's email in Reported-by tag?
> Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>

Roman suggested Closes: when I reached out.

--
Lee Jones