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:   Sat, 10 Dec 2022 06:48:02 -0800
From:   Max Filippov <jcmvbkbc@...il.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     Mark Brown <broonie@...nel.org>,
        Yang Yingliang <yangyingliang@...wei.com>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-xtensa@...ux-xtensa.org, linux-spi@...r.kernel.org
Subject: Re: [PATCH v1] spi: xtensa-xtfpga: Fix a double put() in xtfpga_spi_remove()

Hi Christophe,

On Sat, Dec 10, 2022 at 3:52 AM Christophe JAILLET
<christophe.jaillet@...adoo.fr> wrote:
>
> 'master' is allocated with devm_spi_alloc_master(), there is no need to
> put it explicitly in the remove function.
>
> Fixes: 478cc2fc3dd7 ("spi: xtensa-xtfpga: Switch to use devm_spi_alloc_master()")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>  drivers/spi/spi-xtensa-xtfpga.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/spi/spi-xtensa-xtfpga.c b/drivers/spi/spi-xtensa-xtfpga.c
> index 2fa7608f94cd..271ae98f441c 100644
> --- a/drivers/spi/spi-xtensa-xtfpga.c
> +++ b/drivers/spi/spi-xtensa-xtfpga.c
> @@ -123,7 +123,6 @@ static int xtfpga_spi_remove(struct platform_device *pdev)
>         struct xtfpga_spi *xspi = spi_master_get_devdata(master);
>
>         spi_bitbang_stop(&xspi->bitbang);
> -       spi_master_put(master);

This put is matching the get in the spi_bitbang_start.
It was discussed here:
https://lore.kernel.org/linux-spi/CAMo8BfJaD7pG_iutY8jordysjChyzhTpVSqpxXh3QoZsj2QmaQ@mail.gmail.com/

-- 
Thanks.
-- Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ