]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
PCI hotplug: cpqphp: fix kernel NULL pointer dereference
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Fri, 24 Oct 2008 02:50:03 +0000 (02:50 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 25 Oct 2008 21:32:42 +0000 (14:32 -0700)
commitdaa0b0ad2666acdb331e6611ca790fd0dfe6a1b0
tree4801fd6ff6a2d321931eb7b7ad41c38b4c95fd01
parent3ee82b553d04d90948a41eef761302afcf3f1805
PCI hotplug: cpqphp: fix kernel NULL pointer dereference

commit d2174c3c07adad88dd9ba37a731e0b00b746822a upstream

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug/cpqphp_core.c