[PATCH] arch/x86/kernel/apic/io_apic.c: Fix for crash when apic=debug is used

From: Daniel Kiper
Date: Thu Aug 19 2010 - 18:47:11 EST


Hi,

Here is the patch fixing crash when apic=debug
is used and APIC is not properly initialized.
This issue appears during Xen Dom0 kernel boot
(git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git,
xen/stable-2.6.32.x head), however I think that
patch is rather generic and should be applied
to mainline kernel (it applies to Linux Kernel
Ver. 2.6.35 and Ver. 2.6.32.19 with small fuzz).

Daniel

Signed-off-by: Daniel Kiper <dkiper@xxxxxxxxxxxx>
---
arch/x86/kernel/apic/io_apic.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index e41ed24..2b18af1 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1728,6 +1728,8 @@ __apicdebuginit(void) print_IO_APIC(void)
struct irq_pin_list *entry;

cfg = desc->chip_data;
+ if (!cfg)
+ continue;
entry = cfg->irq_2_pin;
if (!entry)
continue;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/