diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2008-10-16 20:23:51 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-10-23 17:40:06 -0400 |
commit | d2174c3c07adad88dd9ba37a731e0b00b746822a (patch) | |
tree | 3904a0174a0238a3425dbf9a204f05f5112ef376 /drivers/pci | |
parent | 5f4f0c4d3fc95cb7d509e4469a22aed40532f0fc (diff) |
PCI hotplug: cpqphp: fix kernel NULL pointer dereference
The following patch fixes the regression in 2.6.27 that causes kernel
NULL pointer dereference at cpqphp driver probe time. This patch should
be backported to the .27 stable series.
Seems to have been introduced by
f46753c5e354b857b20ab8e0fe7b2579831dc369.
The root cause of this problem seems that cpqphp driver calls
pci_hp_register() wrongly. In current implementation, cpqphp driver
passes 'ctrl->pci_dev->subordinate' as a second parameter for
pci_hp_register(). But because hotplug slots and it's hotplug controller
(exists as a pci funcion) are on the same bus, it should be
'ctrl->pci_dev->bus' instead.
Cc: <stable@kernel.org>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/cpqphp_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c index 724d42c4adbc..8514c3a1746a 100644 --- a/drivers/pci/hotplug/cpqphp_core.c +++ b/drivers/pci/hotplug/cpqphp_core.c | |||
@@ -433,7 +433,7 @@ static int ctrl_slot_setup(struct controller *ctrl, | |||
433 | slot->number, ctrl->slot_device_offset, | 433 | slot->number, ctrl->slot_device_offset, |
434 | slot_number); | 434 | slot_number); |
435 | result = pci_hp_register(hotplug_slot, | 435 | result = pci_hp_register(hotplug_slot, |
436 | ctrl->pci_dev->subordinate, | 436 | ctrl->pci_dev->bus, |
437 | slot->device, | 437 | slot->device, |
438 | name); | 438 | name); |
439 | if (result) { | 439 | if (result) { |