lkml.org 
[lkml]   [2005]   [Nov]   [30]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 3/4] stack overflow safe kdump ( 2.6.15-rc3-i386) - do_nmi
FromFernando Luis Vazquez Cao <>
DateWed, 30 Nov 2005 16:36:57 +0900
crash_nmi_callback is called right after a system crash which might have
caused by stack overflow, thus smp_processor_id should not be trusted.
Use the safe replacement safe_smp_processor_id.

---
diff -urNp linux-2.6.15-rc3/arch/i386/kernel/traps.c linux-2.6.15-rc3-sov/arch/i386/kernel/traps.c
--- linux-2.6.15-rc3/arch/i386/kernel/traps.c	2005-11-30 14:51:49.000000000 +0900
+++ linux-2.6.15-rc3-sov/arch/i386/kernel/traps.c	2005-11-30 14:55:57.000000000 +0900
@@ -648,7 +648,7 @@ fastcall void do_nmi(struct pt_regs * re
 
 	nmi_enter();
 
-	cpu = smp_processor_id();
+	cpu = safe_smp_processor_id();
 
 #ifdef CONFIG_HOTPLUG_CPU
 	if (!cpu_online(cpu)) {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-30 07:44    [from the cache]
©2003-2008