lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <229cf78caaa7e9f2bb4cfa62c019acd51a1cd684.camel@gmail.com>
Date: Thu, 15 May 2025 11:26:56 +0100
From: Nuno Sá <noname.nuno@...il.com>
To: Chen Ni <nichen@...as.ac.cn>, jic23@...nel.org, dlechner@...libre.com, 
	nuno.sa@...log.com, andy@...nel.org, mcoquelin.stm32@...il.com, 
	alexandre.torgue@...s.st.com, u.kleine-koenig@...libre.com,
 tglx@...utronix.de, 	robh@...nel.org, jirislaby@...nel.org,
 fabrice.gasnier@...s.st.com
Cc: linux-iio@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] iio: adc: stm32-adc: Fix race in installing chained
 IRQ handler

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@...as.ac.cn>
> ---

Reviewed-by: Nuno Sá <nuno.sa@...log.com>

> 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;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ