Re: [PATCH] mfd: da9150: fix IRQ action memory leak on removal

From: Guangshuo Li

Date: Tue Oct 27 2026 - 12:27:38 EST


Hi Krzysztof,

On Tue, 27 Oct 2026 at 23:26, Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:
>
> On 27/10/2026 04:08, Guangshuo Li wrote:
> > da9150_remove() currently removes the regmap IRQ chip before removing
> > the MFD child devices. regmap_del_irq_chip() disposes the child IRQ
> > mappings and removes their IRQ descriptors.
> >
> > The GPADC child registers an interrupt handler using
> > devm_request_threaded_irq(). When the child device is subsequently
> > removed, its device-managed cleanup calls free_irq(), which can no
> > longer find the corresponding IRQ descriptor. As a result, the
> > allocated struct irqaction is not freed, causing a memory leak.
> > The associated IRQ thread also cannot be stopped normally.
> >
> > Remove the MFD child devices first so their interrupt handlers are
> > released while the IRQ mappings are still valid. Then remove the
> > regmap IRQ chip and its IRQ domain.
> >
> > This issue was found by our static analysis tool under development.
>
> So you just keep ignoring and ignoring our feedback. It's just bot, so
> little point to discuss with bot.
>
> Best regards,
> Krzysztof

Thank you for your feedback, and I apologize if our recent submissions
gave the impression that we were ignoring your previous comments.

We did take your earlier suggestions into account and subsequently
submitted a patch series accordingly.

For the more recent patches, however, since they address issues in
different drivers, we thought it would be more appropriate to submit
them separately rather than group them into a single series.

We certainly did not intend to disregard your feedback. We appreciate
your time and guidance, and we will be more careful with our future
submissions.

Thank you for your understanding.

Best regards,
Guangshuo Li