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] [day] [month] [year] [list]
Message-ID: <20221114205101.g2jsa2yqfvkyfop7@mercury.elektranox.org>
Date:   Mon, 14 Nov 2022 21:51:01 +0100
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     Yang Yingliang <yangyingliang@...wei.com>
Cc:     linux-kernel@...r.kernel.org, carlos.chinea@...ia.com,
        ivo.g.dimitrov.75@...il.com
Subject: Re: [PATCH] HSI: omap_ssi_core: fix possible memory leak in
 ssi_probe()

Hi,

On Mon, Oct 31, 2022 at 03:43:37PM +0800, Yang Yingliang wrote:
> If ssi_add_controller() returns error, it should call hsi_put_controller()
> to give up the reference that was set in hsi_alloc_controller(), so that
> it can call hsi_controller_release() to free controller and ports that
> allocated in hsi_alloc_controller().
> 
> Fixes: b209e047bc74 ("HSI: Introduce OMAP SSI driver")
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---

Thanks, queued.

-- Sebastian

>  drivers/hsi/controllers/omap_ssi_core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c
> index eb9820158318..80bf09bc5d15 100644
> --- a/drivers/hsi/controllers/omap_ssi_core.c
> +++ b/drivers/hsi/controllers/omap_ssi_core.c
> @@ -502,8 +502,10 @@ static int ssi_probe(struct platform_device *pd)
>  	platform_set_drvdata(pd, ssi);
>  
>  	err = ssi_add_controller(ssi, pd);
> -	if (err < 0)
> +	if (err < 0) {
> +		hsi_put_controller(ssi);
>  		goto out1;
> +	}
>  
>  	pm_runtime_enable(&pd->dev);
>  
> -- 
> 2.25.1
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ