mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 08:06:09 +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:
committed by
Andreas Kling
parent
adeead24a3
commit
a648331e26
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user