Re: [PATCH 2/8] powerpc/pci: Don't scan empty slot

2014-11-25 Thread Gavin Shan
On Wed, Nov 26, 2014 at 09:58:02AM +1100, Benjamin Herrenschmidt wrote: >On Tue, 2014-11-25 at 09:49 +1100, Gavin Shan wrote: >> In hotplug case, function pcibios_add_pci_devices() is called to >> rescan the specified PCI bus, which possibly doesn't have any child >> devices. Access to the PCI bus'

Re: [PATCH 2/8] powerpc/pci: Don't scan empty slot

2014-11-25 Thread Benjamin Herrenschmidt
On Tue, 2014-11-25 at 09:49 +1100, Gavin Shan wrote: > In hotplug case, function pcibios_add_pci_devices() is called to > rescan the specified PCI bus, which possibly doesn't have any child > devices. Access to the PCI bus's child device node will cause kernel > crash without exception. The patch a

[PATCH 2/8] powerpc/pci: Don't scan empty slot

2014-11-24 Thread Gavin Shan
In hotplug case, function pcibios_add_pci_devices() is called to rescan the specified PCI bus, which possibly doesn't have any child devices. Access to the PCI bus's child device node will cause kernel crash without exception. The patch adds two more conditions to avoid the kernel crash. Signed-of