From patchwork Sun Feb 1 22:53:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 21521 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id EDA7CDDFAC for ; Mon, 2 Feb 2009 09:54:52 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: by ozlabs.org (Postfix, from userid 1030) id 8ED34DDF27; Mon, 2 Feb 2009 09:53:50 +1100 (EST) To: From: Benjamin Herrenschmidt Date: Mon, 02 Feb 2009 09:53:39 +1100 Subject: [PATCH] powerpc: Fix oops on some machines due to incorrect pr_debug() Message-Id: <20090201225351.8ED34DDF27@ozlabs.org> X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Recently, a patch left DEBUG enabled in the powerpc common PCI code, resulting in an old bug in a pr_debug() statement to show up and cause a NULL dereference on some machines. This fixes the pr_debug() statement and reverts to DEBUG not being force-enabled in that file. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/pci-common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- linux-work.orig/arch/powerpc/kernel/pci-common.c 2009-01-30 14:32:34.000000000 +1100 +++ linux-work/arch/powerpc/kernel/pci-common.c 2009-02-02 09:51:48.000000000 +1100 @@ -16,7 +16,7 @@ * 2 of the License, or (at your option) any later version. */ -#define DEBUG +#undef DEBUG #include #include @@ -258,7 +258,8 @@ int pci_read_irq_line(struct pci_dev *pc } else { pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", oirq.size, oirq.specifier[0], oirq.specifier[1], - oirq.controller->full_name); + oirq.controller ? oirq.controller->full_name : + ""); virq = irq_create_of_mapping(oirq.controller, oirq.specifier, oirq.size);