Re: [PATCH 05/10] iio: adc: stm32-adc: Detach chained IRQ handler before removing domain

From: Lee Jones

Date: Sun Nov 22 2026 - 16:41:20 EST


On Sat, 21 Nov 2026, Jonathan Cameron wrote:

> On Fri, 20 Nov 2026 18:23:19 +0100
> Fabrice Gasnier <fabrice.gasnier@xxxxxxxxxxx> wrote:
>
> > On 11/19/26 16:30, Lee Jones wrote:
> > > stm32_adc_irq_remove() disposes of the child IRQ mappings and removes
> > > priv->domain before clearing the parent chained IRQ handlers. Because
> > > the parent hardware interrupt lines remain unmasked while child devices
> > > use dummy_irq_chip, an interrupt arriving during teardown invokes
> > > stm32_adc_irq_handler() after irq_domain_remove() has freed
> > > priv->domain, and irq_set_chained_handler() also leaves handler_data
> > > dangling.
> > >
> > > Detach the chained handlers and clear handler_data with
> > > irq_set_chained_handler_and_data() before tearing down the mappings and
> > > removing the domain.
> > >
> > > Fixes: 1add69880240 ("iio: adc: Add support for STM32 ADC core")
> > > Closes: https://sashiko.dev/#/bug/linux-27c38690-bc20-43aa-a3fc-1ddd6f1bb74e
> > > Cc: stable@xxxxxxxxxxxxxxx
> > > Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
> > > ---
> >
> > Hi Lee,
> >
> > Acked-by: Fabrice Gasnier <fabrice.gasnier@xxxxxxxxxxx>
> This one seems a little more likely to be hit in practice, but
> it doesn't apply to the fixes tree due to some other recent changes and
> I'm lazy.
>
> Hence applied to the testing branch of iio.git to line it up for next
> merge cycle. We are getting late enough I should be keeping fixes to critical
> stuff only and I'm going to assume this one isn't.

My preference for all of these sets is for them to be applied for -next
rather than -fixes, if it's all the same to you.

And yes, v2s are no issue (replying to your other comments here).

Bear with.

--
Lee Jones