Re: BUG: null pointer deref in dmar_ir_support

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Suresh Siddha
Date: Wednesday, March 31, 2010 - 6:04 pm

[Problem is in the x86 portion of the code, so copying x86 folks for
their attention]

On Wed, 2010-03-31 at 11:34 -0700, Jan.Grossmann@kielnet.net wrote:

Jan, Problem is that your system doesn't have proper SMP tables and we
were doing enable_IR_x2apic() twice finally leading to this panic. Can
you please check if the appended patch fixes your issue? Thanks.
---

From: Suresh Siddha <suresh.b.siddha@intel.com>
Subject: x86: fix calling enable_IR_x2apic() twice with SMP kernel on !SMP boards

Jan Grossmann reported kernel boot panic while booting SMP kernel on his
system with a single core cpu. SMP kernels call enable_IR_x2apic() from
native_smp_prepare_cpus() and on platforms where the kernel doesn't
find SMP configuration we ended up again calling enable_IR_x2apic() from the
APIC_init_uniprocessor() call in the smp_sanity_check(). Thus leading to
kernel panic.

Don't call enable_IR_x2apic() and default_setup_apic_routing()
from APIC_init_uniprocessor() in CONFIG_SMP case.

Reported-by: Jan.Grossmann@kielnet.net
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: stable@kernel.org [2.6.32, 2.6.33]
---

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 00187f1..e5a4a1e 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1640,8 +1640,10 @@ int __init APIC_init_uniprocessor(void)
 	}
 #endif
 
+#ifndef CONFIG_SMP
 	enable_IR_x2apic();
 	default_setup_apic_routing();
+#endif
 
 	verify_local_APIC();
 	connect_bsp_APIC();


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: BUG: null pointer deref in dmar_ir_support, Suresh Siddha, (Wed Mar 31, 6:04 pm)
Re: BUG: null pointer deref in dmar_ir_support, Jan.Grossmann@kielne ..., (Thu Apr 1, 11:20 am)
Re: BUG: null pointer deref in dmar_ir_support, Suresh Siddha, (Thu Apr 1, 1:04 pm)
Re: BUG: null pointer deref in dmar_ir_support, Suresh Siddha, (Fri Apr 2, 10:21 am)
Re: BUG: null pointer deref in dmar_ir_support, Ingo Molnar, (Fri Apr 2, 11:20 am)
Re: BUG: null pointer deref in dmar_ir_support, Suresh Siddha, (Fri Apr 2, 11:28 am)
Re: BUG: null pointer deref in dmar_ir_support, Ingo Molnar, (Fri Apr 2, 11:45 am)
[tip:x86/urgent] x86: Fix double enable_IR_x2apic() call o ..., tip-bot for Suresh S ..., (Fri Apr 2, 12:14 pm)