[lkml]   [2005]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: crash in entry.S restore_all, 2.6.12-rc2, x86, PAGEALLOC

Linus Torvalds wrote:
>> 2. How can one be sure there are no more
>> of the like places where the stack is left
>> empty?
> That's a good argument, and may be the strongest reason for _not_ doing
> the speculation. However, I don't think it really can happen anywhere
> else.
OK, so how do you feel about the attached
patch? I understand that from some point
of view it may look like a hack, but at
the same time it:
1. Allows to preserve the valueable optimization
2. Works for NMIs
3. Doesn't care whether or not there are more
of the like instances where the stack is left
4. Seems to work for me without the crashes:)

--- linux/arch/i386/kernel/process.c.old 2005-03-20 14:12:18.000000000 +0300
+++ linux/arch/i386/kernel/process.c 2005-04-10 16:54:39.000000000 +0400
@@ -394,7 +394,7 @@
childregs->esp = esp;

p->thread.esp = (unsigned long) childregs;
- p->thread.esp0 = (unsigned long) (childregs+1);
+ p->thread.esp0 = (unsigned long) (childregs+1) - 8;

p->thread.eip = (unsigned long) ret_from_fork;

 \ /
  Last update: 2005-04-10 15:24    [W:0.061 / U:2.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site