x86/dumpstack: When OOPSing, rewind the stack before do_exit()
[deliverable/linux.git] / arch / x86 / entry / entry_32.S
index 983e5d3a0d271c387e24371ddc3fcd6e7110a27d..0b56666e6039b9d090cc01c014ccba2b2662be88 100644 (file)
@@ -1153,3 +1153,14 @@ ENTRY(async_page_fault)
        jmp     error_code
 END(async_page_fault)
 #endif
+
+ENTRY(rewind_stack_do_exit)
+       /* Prevent any naive code from trying to unwind to our caller. */
+       xorl    %ebp, %ebp
+
+       movl    PER_CPU_VAR(cpu_current_top_of_stack), %esi
+       leal    -TOP_OF_KERNEL_STACK_PADDING-PTREGS_SIZE(%esi), %esp
+
+       call    do_exit
+1:     jmp 1b
+END(rewind_stack_do_exit)
This page took 0.025062 seconds and 5 git commands to generate.