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: <ead9e558-2487-b385-33f9-9c96a360762e@microchip.com>
Date:   Thu, 20 Aug 2020 05:56:55 +0000
From:   <Ajay.Kathat@...rochip.com>
To:     <dinghao.liu@....edu.cn>, <kjlu@....edu>
CC:     <Claudiu.Beznea@...rochip.com>, <kvalo@...eaurora.org>,
        <davem@...emloft.net>, <kuba@...nel.org>,
        <Eugen.Hristev@...rochip.com>, <gregkh@...uxfoundation.org>,
        <linux-wireless@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [v2] wilc1000: Fix memleak in wilc_sdio_probe


On 20/08/20 11:18 am, Dinghao Liu wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> When devm_clk_get() returns -EPROBE_DEFER, sdio_priv
> should be freed just like when wilc_cfg80211_init()
> fails.
> 
> Fixes: 8692b047e86cf ("staging: wilc1000: look for rtc_clk clock")
> Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>

Acked-by: Ajay Singh <ajay.kathat@...rochip.com>

> ---
> 
> Changelog:
> 
> v2: - Remove 'staging' prefix in subject.
> ---
>  drivers/net/wireless/microchip/wilc1000/sdio.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c
> index 3ece7b0b0392..351ff909ab1c 100644
> --- a/drivers/net/wireless/microchip/wilc1000/sdio.c
> +++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
> @@ -149,9 +149,10 @@ static int wilc_sdio_probe(struct sdio_func *func,
>         wilc->dev = &func->dev;
> 
>         wilc->rtc_clk = devm_clk_get(&func->card->dev, "rtc");
> -       if (PTR_ERR_OR_ZERO(wilc->rtc_clk) == -EPROBE_DEFER)
> +       if (PTR_ERR_OR_ZERO(wilc->rtc_clk) == -EPROBE_DEFER) {
> +               kfree(sdio_priv);
>                 return -EPROBE_DEFER;
> -       else if (!IS_ERR(wilc->rtc_clk))
> +       } else if (!IS_ERR(wilc->rtc_clk))
>                 clk_prepare_enable(wilc->rtc_clk);
> 
>         dev_info(&func->dev, "Driver Initializing success\n");
> --
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ