mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 22:25:07 +00:00
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:
parent
adeead24a3
commit
a648331e26
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue