From: Matthias Kruk Date: Thu, 19 Sep 2019 10:38:42 +0000 (+0900) Subject: Use the kernel stack passed to task_prepare on the stack, instead of the (invalid... X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=f30fbfa8cd42eae912e3b9ee4cf99f52b2d4aead;p=corax Use the kernel stack passed to task_prepare on the stack, instead of the (invalid) pointer in the task structure --- 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 /*