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: <200609270928.18378.eike-kernel@sf-tec.de>
Date:	Wed, 27 Sep 2006 09:28:17 +0200
From:	Rolf Eike Beer <eike-kernel@...tec.de>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	Andrew Morton <akpm@...l.org>, Greg KH <greg@...ah.com>,
	Jim Paradis <jparadis@...hat.com>, Andi Kleen <ak@...e.de>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86[-64] PCI domain support

Jeff Garzik wrote:

> diff --git a/arch/i386/pci/acpi.c b/arch/i386/pci/acpi.c
> index b33aea8..e4f4828 100644
> --- a/arch/i386/pci/acpi.c
> +++ b/arch/i386/pci/acpi.c
> @@ -8,20 +8,37 @@ #include "pci.h"
>  struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device,
> int domain, int busnum) {
>  	struct pci_bus *bus;
> +	struct pci_sysdata *sd;
>
> +	/* Allocate per-root-bus (not per bus) arch-specific data.
> +	 * TODO: leak; this memory is never freed.
> +	 * It's arguable whether it's worth the trouble to care.
> +	 */
> +	sd = kzalloc(sizeof(*sd), GFP_KERNEL);
> +	if (!sd) {
> +		printk(KERN_ERR "PCI: OOM, not probing PCI bus %02x\n", busnum);
> +		return NULL;
> +	}
> +
> +#ifdef CONFIG_PCI_DOMAINS
> +	sd->domain = domain;
> +#else
>  	if (domain != 0) {
>  		printk(KERN_WARNING "PCI: Multiple domains not supported\n");

kfree(sd);


>  		return NULL;
>  	}
> +#endif /* CONFIG_PCI_DOMAINS */

I would move this check to be done before the memory is allocated so we don't 
need to free it.

Eike

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ