linux/drivers/pci/hotplug
Jiri Slaby a7ef7d1f5e PCI: hotplug/cpqphp, fix NULL dereference
There are devices out there which are PCI Hot-plug controllers with
compaq PCI IDs, but are not bridges, hence have pdev->subordinate
NULL. But cpqphp expects the pointer to be non-NULL.

Add a check to the probe function to avoid oopses like:
BUG: unable to handle kernel NULL pointer dereference at 00000050
IP: [<f82e3c41>] cpqhpc_probe+0x951/0x1120 [cpqphp]
*pdpt = 0000000033779001 *pde = 0000000000000000
...

The device here was:
00:0b.0 PCI Hot-plug controller [0804]: Compaq Computer Corporation PCI Hotplug Controller [0e11:a0f7] (rev 11)
	Subsystem: Compaq Computer Corporation Device [0e11:a2f8]

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-06-11 13:10:21 -07:00
..
acpi_pcihp.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
acpiphp.h PCI hotplug: move IOAPIC support from acpiphp to ioapic driver 2009-11-04 13:06:39 -08:00
acpiphp_core.c PCI: Make current and maximum bus speeds part of the PCI core 2010-02-22 16:15:17 -08:00
acpiphp_glue.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
acpiphp_ibm.c sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
cpci_hotplug.h PCI: cpci_hotplug: stop managing hotplug_slot->name 2008-10-22 16:42:39 -07:00
cpci_hotplug_core.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
cpci_hotplug_pci.c PCI: cpci_hotplug: stop managing hotplug_slot->name 2008-10-22 16:42:39 -07:00
cpcihp_generic.c PCI: hotplug/cpcihp, fix pci device refcounting 2010-02-22 16:17:02 -08:00
cpcihp_zt5550.c
cpcihp_zt5550.h
cpqphp.h PCI: Make current and maximum bus speeds part of the PCI core 2010-02-22 16:15:17 -08:00
cpqphp_core.c PCI: hotplug/cpqphp, fix NULL dereference 2010-06-11 13:10:21 -07:00
cpqphp_ctrl.c PCI: Make current and maximum bus speeds part of the PCI core 2010-02-22 16:15:17 -08:00
cpqphp_nvram.c PCI Hotplug: cpqphp: fix comment style 2009-06-11 12:04:08 -07:00
cpqphp_nvram.h
cpqphp_pci.c PCI Hotplug: cpqphp: don't use pci_find_slot() 2009-06-11 12:04:16 -07:00
cpqphp_sysfs.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
fakephp.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ibmphp.h PCI: ibmphp: stop managing hotplug_slot->name 2008-10-22 16:42:41 -07:00
ibmphp_core.c PCI: Make current and maximum bus speeds part of the PCI core 2010-02-22 16:15:17 -08:00
ibmphp_ebda.c PCI hotplug: check ioremap() return value in ibmphp_ebda.c 2010-02-22 16:17:19 -08:00
ibmphp_hpc.c PCI hotplug: fix ibmphp build error 2010-02-22 16:17:18 -08:00
ibmphp_pci.c
ibmphp_res.c ibmphp: Rename add_range() to add_bus_range() to avoid conflict 2010-02-10 17:45:09 -08:00
Kconfig PCI: drivers/pci/slot.c should depend on CONFIG_SYSFS 2009-06-18 13:57:24 -07:00
Makefile PCI hotplug: acpiphp should be linked after vendor drivers 2009-11-04 08:47:14 -08:00
pci_hotplug_core.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pciehp.h pciehp: use pci_pcie_cap() 2009-11-24 15:25:15 -08:00
pciehp_acpi.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pciehp_core.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pciehp_ctrl.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pciehp_hpc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pciehp_pci.c PCI: hotplug: pciehp: Removed check for hotplug of display devices 2010-05-21 14:43:46 -07:00
pcihp_skeleton.c PCI hotplug: remove redundant .owner initializations 2009-06-16 14:30:12 -07:00
pcihp_slot.c PCI hotplug: use pci_is_pcie() 2009-11-24 15:25:18 -08:00
rpadlpar.h
rpadlpar_core.c powerpc/pseries: Flush lazy kernel mappings after unplug operations 2010-04-28 16:23:24 +10:00
rpadlpar_sysfs.c
rpaphp.h PCI hotplug: rpaphp: make debug var unique 2008-10-20 10:54:27 -07:00
rpaphp_core.c powerpc/pseries: Flush lazy kernel mappings after unplug operations 2010-04-28 16:23:24 +10:00
rpaphp_pci.c PCI hotplug: rpaphp: make debug var unique 2008-10-20 10:54:27 -07:00
rpaphp_slot.c PCI: rpaphp: kmalloc/kfree slot->name directly 2008-10-22 16:42:42 -07:00
sgi_hotplug.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
shpchp.h PCI: Make current and maximum bus speeds part of the PCI core 2010-02-22 16:15:17 -08:00
shpchp_core.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
shpchp_ctrl.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
shpchp_hpc.c PCI: Make current and maximum bus speeds part of the PCI core 2010-02-22 16:15:17 -08:00
shpchp_pci.c PCI hotplug: shpchp: use generic pci_configure_slot() 2009-09-14 17:39:11 -07:00
shpchp_sysfs.c PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs 2010-02-23 09:43:31 -08:00