diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index 55496cb369..a3777541b5 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -840,6 +840,12 @@ ErrorOr Process::exec(NonnullOwnPtr path, NonnullOwnPtrVector path_deleter = move(path); + } + // We need to enter the scheduler lock before changing the state // and it will be released after the context switch into that // thread. We should also still be in our critical section