1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:57:35 +00:00

Kernel: Disable big process lock for sys$get_stack_bounds

This syscall only reads from the shared m_space field, but that field
is only over written to by Process::attach_resources, before the
process was initialized (aka, before syscalls can happen), by
Process::finalize which is only called after all the process' threads
have exited (aka, syscalls can not happen anymore), and by
Process::do_exec which calls all other syscall-capable threads before
doing so. Space's find_region_containing already holds its own lock,
and as such there's no need to hold the big lock.
This commit is contained in:
Idan Horowitz 2021-08-06 15:21:08 +03:00 committed by Andreas Kling
parent d40038a04f
commit efeb01e35f
2 changed files with 2 additions and 2 deletions

View file

@ -177,7 +177,7 @@ enum class NeedsBigProcessLock {
S(unveil, NeedsBigProcessLock::Yes) \
S(perf_event, NeedsBigProcessLock::Yes) \
S(shutdown, NeedsBigProcessLock::Yes) \
S(get_stack_bounds, NeedsBigProcessLock::Yes) \
S(get_stack_bounds, NeedsBigProcessLock::No) \
S(ptrace, NeedsBigProcessLock::Yes) \
S(sendfd, NeedsBigProcessLock::Yes) \
S(recvfd, NeedsBigProcessLock::Yes) \