tree 495fa8e9c1ddaba3c354ed6064114b75ffe95c86
parent 02b5ff1bbf278c7e5121916bb11470939e0ece72
author Andi Kleen <[EMAIL PROTECTED]> Tue Apr 12 08:25:31 2005
committer Linus Torvalds <[EMAIL PROTECTED]> Tue Apr 12 08:25:31 2005

[PATCH] x86_64: Dump stack and prevent recursion on early fault

Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 head.S |    8 ++++++++
 1 files changed, 8 insertions(+)

Index: arch/x86_64/kernel/head.S
===================================================================
--- 7a0a0711242531e3b8f1b3a8d01af54645c5387f/arch/x86_64/kernel/head.S  
(mode:100644 sha1:56a3946974e5333d216913e549d03052768a4e9b)
+++ 495fa8e9c1ddaba3c354ed6064114b75ffe95c86/arch/x86_64/kernel/head.S  
(mode:100644 sha1:077738e66556842258456894f9f009dfaa662711)
@@ -200,14 +200,22 @@
        .quad  init_thread_union+THREAD_SIZE-8
 
 ENTRY(early_idt_handler)
+       cmpl $2,early_recursion_flag(%rip)
+       jz  1f
+       incl early_recursion_flag(%rip)
        xorl %eax,%eax
        movq 8(%rsp),%rsi       # get rip
        movq (%rsp),%rdx
        movq %cr2,%rcx
        leaq early_idt_msg(%rip),%rdi
        call early_printk
+       cmpl $2,early_recursion_flag(%rip)
+       jz  1f
+       call dump_stack
 1:     hlt
        jmp 1b
+early_recursion_flag:
+       .long 0
 
 early_idt_msg:
        .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n"
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to