[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081017003334.GA28723@ldl.fc.hp.com>
Date: Thu, 16 Oct 2008 18:33:34 -0600
From: Alex Chiang <achiang@...com>
To: Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>
Cc: "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
Ingo Molnar <mingo@...e.hu>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
Yinghai Lu <yinghai@...nel.org>, stable@...nel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [BUG][PATCH] cpqphp: fix kernel NULL pointer dereference
* Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>:
>
> 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@...nel.org>
Acked-by: Alex Chiang <achiang@...com>
> Tested-by: Ingo Molnar <mingo@...e.hu>
> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>
>
> ---
> drivers/pci/hotplug/cpqphp_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-2.6-tip/drivers/pci/hotplug/cpqphp_core.c
> ===================================================================
> --- linux-2.6-tip.orig/drivers/pci/hotplug/cpqphp_core.c
> +++ linux-2.6-tip/drivers/pci/hotplug/cpqphp_core.c
> @@ -435,7 +435,7 @@ static int ctrl_slot_setup(struct contro
> slot->number, ctrl->slot_device_offset,
> slot_number);
> result = pci_hp_register(hotplug_slot,
> - ctrl->pci_dev->subordinate,
> + ctrl->pci_dev->bus,
> slot->device);
> if (result) {
> err("pci_hp_register failed with error %d\n", result);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists