Commit:     692174b97d5b871f4b0f648b1fb17aa37b955876
Parent:     1b523fb54977c9bb81b16c4badce581a2b455994
Author:     Rusty Russell <[EMAIL PROTECTED]>
AuthorDate: Wed May 2 19:27:09 2007 +0200
Committer:  Andi Kleen <[EMAIL PROTECTED]>
CommitDate: Wed May 2 19:27:09 2007 +0200

    [PATCH] i386: Initialize esp0 properly all the time
    Whenever we schedule, __switch_to calls load_esp0 which does:
        tss->esp0 = thread->esp0;
    This is never initialized for the initial thread (ie "swapper"), so when 
    scheduling that, we end up setting esp0 to 0.  This is fine: the swapper 
    leaves ring 0, so this field is never used.
    lguest, however, gets upset that we're trying to used an unmapped page as 
    kernel stack.  Rather than work around it there, let's initialize it.
    Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Cc: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
 include/asm-i386/processor.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h
index 11bf899..01ae0ff 100644
--- a/include/asm-i386/processor.h
+++ b/include/asm-i386/processor.h
@@ -421,6 +421,7 @@ struct thread_struct {
 #define INIT_THREAD  {                                                 \
+       .esp0 = sizeof(init_stack) + (long)&init_stack,                 \
        .vm86_info = NULL,                                              \
        .sysenter_cs = __KERNEL_CS,                                     \
        .io_bitmap_ptr = NULL,                                          \
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to