Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Fix oops on some machines due to incorrect pr_debug()

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 <benh@kernel.crashing.org>

+2 -3
+2 -3
arch/powerpc/kernel/pci-common.c
··· 16 16 * 2 of the License, or (at your option) any later version. 17 17 */ 18 18 19 - #define DEBUG 20 - 21 19 #include <linux/kernel.h> 22 20 #include <linux/pci.h> 23 21 #include <linux/string.h> ··· 256 258 } else { 257 259 pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", 258 260 oirq.size, oirq.specifier[0], oirq.specifier[1], 259 - oirq.controller->full_name); 261 + oirq.controller ? oirq.controller->full_name : 262 + "<default>"); 260 263 261 264 virq = irq_create_of_mapping(oirq.controller, oirq.specifier, 262 265 oirq.size);