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]
Date:   Thu, 17 Aug 2017 15:03:54 +0200
From:   Boris Brezillon <boris.brezillon@...e-electrons.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     dwmw2@...radead.org, computersforpeace@...il.com,
        marek.vasut@...il.com, richard@....at, cyrille.pitchen@...ev4u.fr,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] mtd: physmap_of: Fix resources leak in
 'of_flash_probe()'

Le Sun,  6 Aug 2017 14:55:01 +0200,
Christophe JAILLET <christophe.jaillet@...adoo.fr> a écrit :

> If 'of_flash_probe_gemini()' or 'of_flash_probe_versatile()' fail, we must
> reslease some resources, as already done in all error handling paths in
> this function.

Applied to l2-mtd/master.

Thanks,

Boris

> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>  drivers/mtd/maps/physmap_of_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/maps/physmap_of_core.c b/drivers/mtd/maps/physmap_of_core.c
> index 62fa6836f218..2c8cc97ce019 100644
> --- a/drivers/mtd/maps/physmap_of_core.c
> +++ b/drivers/mtd/maps/physmap_of_core.c
> @@ -235,10 +235,10 @@ static int of_flash_probe(struct platform_device *dev)
>  
>  		err = of_flash_probe_gemini(dev, dp, &info->list[i].map);
>  		if (err)
> -			return err;
> +			goto err_out;
>  		err = of_flash_probe_versatile(dev, dp, &info->list[i].map);
>  		if (err)
> -			return err;
> +			goto err_out;
>  
>  		err = -ENOMEM;
>  		info->list[i].map.virt = ioremap(info->list[i].map.phys,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ