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]
Date:   Tue, 3 Apr 2018 07:24:47 +0000
From:   Amelie DELAUNAY <amelie.delaunay@...com>
To:     Alexey Khoroshilov <khoroshilov@...ras.ru>,
        Mark Brown <broonie@...nel.org>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        "Alexandre TORGUE" <alexandre.torgue@...com>
CC:     "linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "ldv-project@...uxtesting.org" <ldv-project@...uxtesting.org>
Subject: RE: [PATCH] spi: stm32: Fix error handling in stm32_spi_probe()

Hi,

> -----Original Message-----
> From: Alexey Khoroshilov [mailto:khoroshilov@...ras.ru]
> Sent: vendredi 30 mars 2018 21:55
> To: Mark Brown <broonie@...nel.org>; Amelie DELAUNAY
> <amelie.delaunay@...com>; Maxime Coquelin
> <mcoquelin.stm32@...il.com>; Alexandre TORGUE
> <alexandre.torgue@...com>
> Cc: Alexey Khoroshilov <khoroshilov@...ras.ru>; linux-spi@...r.kernel.org;
> linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; ldv-
> project@...uxtesting.org
> Subject: [PATCH] spi: stm32: Fix error handling in stm32_spi_probe()
> 
> clk_get_rate() is below clk_prepare_enable(), so its error should lead to goto
> err_clk_disable, not to err_master_put.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
> ---
>  drivers/spi/spi-stm32.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index
> ba9743fa2326..ad1e55d3d5d5 100644
> --- a/drivers/spi/spi-stm32.c
> +++ b/drivers/spi/spi-stm32.c
> @@ -1129,7 +1129,7 @@ static int stm32_spi_probe(struct platform_device
> *pdev)
>  	if (!spi->clk_rate) {
>  		dev_err(&pdev->dev, "clk rate = 0\n");
>  		ret = -EINVAL;
> -		goto err_master_put;
> +		goto err_clk_disable;
>  	}
> 
>  	spi->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
> --
> 2.7.4

Thanks for the patch!

Reviewed-by: Amelie Delaunay <amelie.delaunay@...com>

Regards,
Amelie

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ