From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: Chen Ni <nichen@iscas.ac.cn>,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com,
u.kleine-koenig@baylibre.com, tglx@linutronix.de,
robh@kernel.org, jirislaby@kernel.org,
fabrice.gasnier@foss.st.com, linux-iio@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: adc: stm32-adc: Fix race in installing chained IRQ handler
Date: Sun, 25 May 2025 12:07:03 +0100 [thread overview]
Message-ID: <20250525120703.5dd89fc2@jic23-huawei> (raw)
In-Reply-To: <229cf78caaa7e9f2bb4cfa62c019acd51a1cd684.camel@gmail.com>
On Thu, 15 May 2025 11:26:56 +0100
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Thu, 2025-05-15 at 16:31 +0800, Chen Ni wrote:
> > Fix a race where a pending interrupt could be received and the handler
> > called before the handler's data has been setup, by converting to
> > irq_set_chained_handler_and_data().
> >
> > Fixes: d58c67d1d851 ("iio: adc: stm32-adc: add support for STM32MP1")
> > Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> > ---
>
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Looks good to me and I've queued it up for after rc1. If any
ST folk have time to take a look that would be great.
Jonathan
>
> > Changelog:
> >
> > v1 -> v2:
> >
> > 1. Add Fixes tag.
> > ---
> > drivers/iio/adc/stm32-adc-core.c | 7 +++----
> > 1 file changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-
> > core.c
> > index bd3458965bff..21c04a98b3b6 100644
> > --- a/drivers/iio/adc/stm32-adc-core.c
> > +++ b/drivers/iio/adc/stm32-adc-core.c
> > @@ -430,10 +430,9 @@ static int stm32_adc_irq_probe(struct platform_device
> > *pdev,
> > return -ENOMEM;
> > }
> >
> > - for (i = 0; i < priv->cfg->num_irqs; i++) {
> > - irq_set_chained_handler(priv->irq[i], stm32_adc_irq_handler);
> > - irq_set_handler_data(priv->irq[i], priv);
> > - }
> > + for (i = 0; i < priv->cfg->num_irqs; i++)
> > + irq_set_chained_handler_and_data(priv->irq[i],
> > + stm32_adc_irq_handler,
> > priv);
> >
> > return 0;
> > }
next prev parent reply other threads:[~2025-05-25 11:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 8:31 [PATCH v2] iio: adc: stm32-adc: Fix race in installing chained IRQ handler Chen Ni
2025-05-15 10:26 ` Nuno Sá
2025-05-25 11:07 ` Jonathan Cameron [this message]
2025-05-26 15:48 ` Fabrice Gasnier
2025-05-31 15:56 ` Jonathan Cameron
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=20250525120703.5dd89fc2@jic23-huawei \
--to=jic23@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=jirislaby@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=nichen@iscas.ac.cn \
--cc=noname.nuno@gmail.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=tglx@linutronix.de \
--cc=u.kleine-koenig@baylibre.com \
/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