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.
This commit is contained in:
Robin Burchell
2019-07-17 14:15:13 +02:00
committed by Andreas Kling
parent adeead24a3
commit a648331e26

View File

@@ -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;
}