Kernel: Mark sys$getpeername as not needing the big process lock

This syscall does not access any big process lock protected resources.
This commit is contained in:
Idan Horowitz 2023-12-16 13:35:06 +02:00 committed by Andreas Kling
parent 24a60c5a10
commit ed5406e47d
2 changed files with 2 additions and 2 deletions

View file

@ -97,7 +97,7 @@ enum class NeedsBigProcessLock {
S(getgroups, NeedsBigProcessLock::No) \
S(gethostname, NeedsBigProcessLock::No) \
S(getkeymap, NeedsBigProcessLock::No) \
S(getpeername, NeedsBigProcessLock::Yes) \
S(getpeername, NeedsBigProcessLock::No) \
S(getpgid, NeedsBigProcessLock::No) \
S(getpgrp, NeedsBigProcessLock::No) \
S(getpid, NeedsBigProcessLock::No) \

View file

@ -367,7 +367,7 @@ ErrorOr<FlatPtr> Process::sys$getsockname(Userspace<Syscall::SC_getsockname_para
ErrorOr<FlatPtr> Process::sys$getpeername(Userspace<Syscall::SC_getpeername_params const*> user_params)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
VERIFY_NO_PROCESS_BIG_LOCK(this);
auto params = TRY(copy_typed_from_user(user_params));
TRY(get_sock_or_peer_name<SockOrPeerName::PeerName>(params));
return 0;