From f30fbfa8cd42eae912e3b9ee4cf99f52b2d4aead Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Thu, 19 Sep 2019 19:38:42 +0900 Subject: [PATCH] Use the kernel stack passed to task_prepare on the stack, instead of the (invalid) pointer in the task structure --- kernel/arch/task.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/arch/task.S b/kernel/arch/task.S index 4cad113..9e1433c 100644 --- a/kernel/arch/task.S +++ b/kernel/arch/task.S @@ -1,6 +1,6 @@ /* * This file is part of the Corax operating system. - * Copyright (C) 2016 Matthias Kruk + * Copyright (C) 2016-2019 Matthias Kruk * * Corax is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -52,7 +52,7 @@ task_prepare: movl %eax, OFFSET_CR3(%edi) /* calculate stack start (since it grows down) */ - movl OFFSET_KSTACK(%edi), %eax + movl 16(%esp), %eax addl $CONFIG_KERNEL_STACK_SIZE, %eax /* -- 2.47.3