]> git.baikalelectronics.ru Git - kernel.git/commit
PCI hotplug: cpqphp: fix kernel NULL pointer dereference
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Fri, 17 Oct 2008 00:23:51 +0000 (09:23 +0900)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 23 Oct 2008 21:40:06 +0000 (14:40 -0700)
commitb8a354ffbf254ead83d963e77a454acb985fa0e3
tree3904a0174a0238a3425dbf9a204f05f5112ef376
parent498e6f02f0da8ffa9ac215b5109d079a7170e84d
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
b58916f81c317298895a9044c69f41cd0fb3e381.

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>
drivers/pci/hotplug/cpqphp_core.c