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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3d75cb8e-456a-4de4-808d-7ca5196800ea@oracle.com>
Date: Wed, 28 Jan 2026 12:45:09 +0530
From: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
To: Jonathan Cameron <jic23@...nel.org>,
        David Lechner
 <dlechner@...libre.com>,
        Nuno Sá <nuno.sa@...log.com>,
        Andy Shevchenko <andy@...nel.org>,
        Gustavo Bastos <gustavobastos@....br>,
        Andrew Ijano <andrew.ijano@...il.com>,
        Lars-Peter Clausen <lars@...afoo.de>, linux-iio@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc: dan.carpenter@...aro.org, kernel-janitors@...r.kernel.org,
        error27@...il.com
Subject: Re: [PATCH] iio: sca3000: Fix a resource leak in sca3000_probe()

Hi,
On 28/01/26 12:19, Harshit Mogalapalli wrote:
> spi->irq from request_threaded_irq() not released when
> iio_device_register() fails. Add an return value check and jump to a
> common error handler when iio_device_register() fails.
> 
> Fixes: 9a4936dc89a3 ("staging:iio:accel:sca3000 Tidy up probe order to avoid a race.")
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
> ---

Missed informing about how it was found.

Only compile tested, found with smatch.

>   drivers/iio/accel/sca3000.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c
> index bfa8a3f5a92f..9ef4d6e27466 100644
> --- a/drivers/iio/accel/sca3000.c
> +++ b/drivers/iio/accel/sca3000.c
> @@ -1489,7 +1489,11 @@ static int sca3000_probe(struct spi_device *spi)
>   	if (ret)
>   		goto error_free_irq;
>   
> -	return iio_device_register(indio_dev);
> +	ret = iio_device_register(indio_dev);
> +	if (ret)
> +		goto error_free_irq;
> +
> +	return 0;
>   
>   error_free_irq:
>   	if (spi->irq)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ