From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753670AbYJQAer (ORCPT ); Thu, 16 Oct 2008 20:34:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754036AbYJQAeY (ORCPT ); Thu, 16 Oct 2008 20:34:24 -0400 Received: from g1t0028.austin.hp.com ([15.216.28.35]:44665 "EHLO g1t0028.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753372AbYJQAeX (ORCPT ); Thu, 16 Oct 2008 20:34:23 -0400 Date: Thu, 16 Oct 2008 18:33:34 -0600 From: Alex Chiang To: Kenji Kaneshige Cc: "linux-pci@vger.kernel.org" , Ingo Molnar , Jesse Barnes , Yinghai Lu , stable@kernel.org, Linux Kernel Mailing List Subject: Re: [BUG][PATCH] cpqphp: fix kernel NULL pointer dereference Message-ID: <20081017003334.GA28723@ldl.fc.hp.com> Mail-Followup-To: Alex Chiang , Kenji Kaneshige , "linux-pci@vger.kernel.org" , Ingo Molnar , Jesse Barnes , Yinghai Lu , stable@kernel.org, Linux Kernel Mailing List References: <48F7DB17.9020302@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48F7DB17.9020302@jp.fujitsu.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Kenji Kaneshige : > > 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: Acked-by: Alex Chiang > Tested-by: Ingo Molnar > Signed-off-by: Kenji Kaneshige > > --- > 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); >