From 7d9fdf5918ed973b48f10a97f4a4e5dca09628fe Mon Sep 17 00:00:00 2001 From: beveloper Date: Sat, 30 Nov 2002 02:36:31 +0000 Subject: [PATCH] make sure that the stack page is in place before disabling interrupts. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2125 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/arch/x86/arch_thread.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/kernel/core/arch/x86/arch_thread.c b/src/kernel/core/arch/x86/arch_thread.c index 1f20a5ff3a..3a49bd4475 100755 --- a/src/kernel/core/arch/x86/arch_thread.c +++ b/src/kernel/core/arch/x86/arch_thread.c @@ -189,6 +189,11 @@ arch_thread_enter_uspace(addr entry, void *args, addr ustack_top) // make sure the fpu is in a good state asm("fninit"); + + // access the new stack to make sure the memory page is present + // while interrupts are disabled. + // XXX does this belong there, should caller take care of it? + *(uint32 *)(ustack_top - 8) = 0; disable_interrupts();