diff options
author | Robin Burchell <robin+git@viroteck.net> | 2019-07-17 14:15:13 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-17 14:23:15 +0200 |
commit | a648331e2621b6dd8ef4e43c603854e3fcdf163a (patch) | |
tree | 2e80f1c9713597531dc4a09e80c1ee738cf66a65 | |
parent | adeead24a3892e21fc19603bc5cb5abe57b181ca (diff) | |
download | serenity-a648331e2621b6dd8ef4e43c603854e3fcdf163a.zip |
Kernel: Fix a nasty lock bug with exec()
Exec doesn't leave through the syscall handler, so it didn't unlock the
big_lock. This means that reentering can lock it again, and then another
thread could endlessly yield waiting to acquire the lock (futilely).
This fixes AudioServer using 100% CPU.
-rw-r--r-- | Kernel/Process.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 7ce78fadd0..0409299eb7 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -442,6 +442,7 @@ int Process::do_exec(String path, Vector<String> arguments, Vector<String> envir #endif main_thread().set_state(Thread::State::Skip1SchedulerPass); + big_lock().unlock_if_locked(); return 0; } |