Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757870AbYJXEsV (ORCPT ); Fri, 24 Oct 2008 00:48:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753186AbYJXEjl (ORCPT ); Fri, 24 Oct 2008 00:39:41 -0400 Received: from kroah.org ([198.145.64.141]:51977 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751735AbYJXEjf (ORCPT ); Fri, 24 Oct 2008 00:39:35 -0400 Date: Thu, 23 Oct 2008 21:35:27 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org, jejb@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Kenji Kaneshige , Jesse Barnes Subject: [patch 26/27] PCI hotplug: cpqphp: fix kernel NULL pointer dereference Message-ID: <20081024043527.GA30828@kroah.com> References: <20081024042023.054190751@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="pci-hotplug-cpqphp-fix-kernel-null-pointer-dereference.patch" In-Reply-To: <20081024043303.GA30828@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1794 Lines: 49 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: Kenji Kaneshige 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 Signed-off-by: Kenji Kaneshige Signed-off-by: Jesse Barnes Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/cpqphp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pci/hotplug/cpqphp_core.c +++ b/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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/