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:   Tue, 21 Apr 2020 17:12:34 +1000
From:   Greg Ungerer <gerg@...ux-m68k.org>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        geert@...ux-m68k.org, bhelgaas@...gle.com,
        lorenzo.pieralisi@....com
Cc:     linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] m68k/PCI: Fix a memory leak in an error handling path

Hi Christophe,

On 18/4/20 5:07 pm, Christophe JAILLET wrote:
> If 'ioremap' fails, we must free 'bridge', as done in other error handling
> path bellow.
> 
> Fixes: 19cc4c843f40 ("m68k/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

Looks good, thanks.
I will queue this in the for-next branch of the m68knommu tree.

Regards
Greg


> ---
>   arch/m68k/coldfire/pci.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/m68k/coldfire/pci.c b/arch/m68k/coldfire/pci.c
> index 62b0eb6cf69a..84eab0f5e00a 100644
> --- a/arch/m68k/coldfire/pci.c
> +++ b/arch/m68k/coldfire/pci.c
> @@ -216,8 +216,10 @@ static int __init mcf_pci_init(void)
>   
>   	/* Keep a virtual mapping to IO/config space active */
>   	iospace = (unsigned long) ioremap(PCI_IO_PA, PCI_IO_SIZE);
> -	if (iospace == 0)
> +	if (iospace == 0) {
> +		pci_free_host_bridge(bridge);
>   		return -ENODEV;
> +	}
>   	pr_info("Coldfire: PCI IO/config window mapped to 0x%x\n",
>   		(u32) iospace);
>   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ