From 9b3c7816a3d9aef6148af4b126b71f96d3a3f1ca Mon Sep 17 00:00:00 2001 From: apio Date: Thu, 13 Oct 2022 21:23:51 +0200 Subject: [PATCH] Scheduler: pop the interrupt state when returning early from load_user_task() --- kernel/src/thread/Scheduler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/src/thread/Scheduler.cpp b/kernel/src/thread/Scheduler.cpp index ee6fb844..20bbf9b9 100644 --- a/kernel/src/thread/Scheduler.cpp +++ b/kernel/src/thread/Scheduler.cpp @@ -121,6 +121,7 @@ void Scheduler::load_user_task(const char* filename) if (ELFLoader::check_elf_image_from_filesystem(filename) < 0) { kerrorln("Failed to load %s from initrd", filename); + Interrupts::pop(); return; } Task* new_task = new Task;