From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from acsinet15.oracle.com ([141.146.126.227]:47776 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753587Ab2ISSzM (ORCPT ); Wed, 19 Sep 2012 14:55:12 -0400 From: Yinghai Lu To: Bjorn Helgaas , Len Brown , Taku Izumi , Jiang Liu , x86 Cc: Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Yinghai Lu Subject: [PATCH 02/40] PCI, x86: clear initial value for root info resources Date: Wed, 19 Sep 2012 11:54:16 -0700 Message-Id: <1348080894-23412-3-git-send-email-yinghai@kernel.org> In-Reply-To: <1348080894-23412-1-git-send-email-yinghai@kernel.org> References: <1348080894-23412-1-git-send-email-yinghai@kernel.org> Sender: linux-pci-owner@vger.kernel.org List-ID: Found one system one root bus hot remove get panic. Panic happens when try to release hostbridge resource. It turns out that resource get reject during put into resource tree because of conflicts. Also that resource parent pointer have random value. That invalid value cause it pass through check __release_pci_root_info and panic in release_resource. Try to use kzalloc instead. Signed-off-by: Yinghai Lu Cc: x86@kernel.org --- arch/x86/pci/acpi.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 505acdd..192397c 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c @@ -305,7 +305,6 @@ setup_resource(struct acpi_resource *acpi_res, void *data) res->flags = flags; res->start = start; res->end = end; - res->child = NULL; if (!pci_use_crs) { dev_printk(KERN_DEBUG, &info->bridge->dev, @@ -434,7 +433,7 @@ probe_pci_root_info(struct pci_root_info *info, struct acpi_device *device, size = sizeof(*info->res) * info->res_num; info->res_num = 0; - info->res = kmalloc(size, GFP_KERNEL); + info->res = kzalloc(size, GFP_KERNEL); if (!info->res) return; -- 1.7.7