mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +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
Notes:
sideshowbarker
2024-07-19 13:13:10 +09:00
Author: https://github.com/rburchell
Commit: a648331e26
Pull-request: https://github.com/SerenityOS/serenity/pull/324
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
|
#endif
|
||||||
|
|
||||||
main_thread().set_state(Thread::State::Skip1SchedulerPass);
|
main_thread().set_state(Thread::State::Skip1SchedulerPass);
|
||||||
|
big_lock().unlock_if_locked();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue