patch "iio: adc: stm32-adc: Fix race in installing chained IRQ handler" added to char-misc-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
iio: adc: stm32-adc: Fix race in installing chained IRQ handler
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From e8ad595064f6ebd5d2d1a5d5d7ebe0efce623091 Mon Sep 17 00:00:00 2001
From: Chen Ni <[email protected]>
Date: Thu, 15 May 2025 16:31:01 +0800
Subject: iio: adc: stm32-adc: Fix race in installing chained IRQ handler
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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().
--- drivers/iio/adc/stm32-adc-core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/iio/adc/stm32-adc-core.c +3 -4
@@ -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 ; }
Signature · 1 line
2.50.0