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: <20170710145751.GB20365@bhelgaas-glaptop.roam.corp.google.com>
Date:   Mon, 10 Jul 2017 09:57:51 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Cc:     linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jason Cooper <jason@...edaemon.net>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Russell King <linux@...linux.org.uk>,
        Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH 1/2] ARM/PCI: bios32: Fix pcibios_init_resource() error
 return path

On Mon, Jul 10, 2017 at 01:34:08PM +0100, Lorenzo Pieralisi wrote:
> Since commit 97ad2bdcbe85 ("ARM/PCI: Convert PCI scan API to
> pci_scan_root_bus_bridge()") struct pci_sys_data is allocated through
> pci_alloc_host_bridge() which implies that, if pcibios_init_resource()
> fails, the pci_sys_data should be freed along with struct pci_host_bridge
> members through pci_free_host_bridge() instead of a simple kfree.
> 
> Fix commit 97ad2bdcbe85 ("ARM/PCI: Convert PCI scan API to
> pci_scan_root_bus_bridge()") by updating pcibios_init_resource()
> error path.
> 
> Fixes: 97ad2bdcbe85 ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()")
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
> Cc: Jason Cooper <jason@...edaemon.net>
> CC: Bjorn Helgaas <bhelgaas@...gle.com>
> Cc: Russell King <linux@...linux.org.uk>
> Cc: Andrew Lunn <andrew@...n.ch>

Applied to for-linus for v4.13, thanks!

> ---
>  arch/arm/kernel/bios32.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
> index 56dc1a3..c1809fb 100644
> --- a/arch/arm/kernel/bios32.c
> +++ b/arch/arm/kernel/bios32.c
> @@ -480,7 +480,7 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
>  
>  			ret = pcibios_init_resource(nr, sys, hw->io_optional);
>  			if (ret)  {
> -				kfree(sys);
> +				pci_free_host_bridge(bridge);
>  				break;
>  			}
>  
> -- 
> 2.10.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ