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: <CAOfQC9-kS_nVg-+2OZRGHP1X-E7B12uG63QGfB64hPAGecgFLw@mail.gmail.com>
Date:	Fri, 26 Aug 2011 07:14:16 +0800
From:	Deng-Cheng Zhu <dengcheng.zhu@...il.com>
To:	Bjorn Helgaas <bhelgaas@...gle.com>
Cc:	jbarnes@...tuousgeek.org, ralf@...ux-mips.org,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-mips@...ux-mips.org, eyal@...s.com, zenon@...s.com
Subject: Re: [RFC PATCH 1/3] MIPS: PCI: Use pci_bus_remove_resources()/pci_bus_add_resource()
 to set up root resources

2011/8/25 Bjorn Helgaas <bhelgaas@...gle.com>:
> No, I just mean that I don't see why you need this patch at all.  If
> you pass the list of bus resources to pci_create_bus(), there's no
> need to fix anything up later.  Or am I missing something?

Well, doing the root resource fixups in here is a *paranoid* way. It's to
deal with the 'unlikely' circumstance where controller_resources() returns
the NULL pointer in pcibios_scanbus() due to memory allocation failure.
Most of the time (always) it's nothing more than repeating the resource
list setup. But maybe we can do something like this:

if (unlikely(!dev && list_empty(&bus->resources))
        pcibios_setup_root_resources(bus, hose);


What do you think?


Deng-Cheng
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ