summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-04-09 23:01:59 +0300
committerAndreas Kling <kling@serenityos.org>2022-04-09 23:46:02 +0200
commit5a96260e250d466257d59067f653fec393d3eec5 (patch)
treed3546731f27ffa5b53d359123c668b4a0b98b365
parentc2372242b17531224b024916072098a92878d411 (diff)
downloadserenity-5a96260e250d466257d59067f653fec393d3eec5.zip
Kernel: Remove big lock from sys$setsockopt
This syscall doesn't access any unprotected shared data.
-rw-r--r--Kernel/API/Syscall.h2
-rw-r--r--Kernel/Syscalls/socket.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index ac18931dbd..041f195eae 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -163,7 +163,7 @@ enum class NeedsBigProcessLock {
S(setresuid, NeedsBigProcessLock::Yes) \
S(setreuid, NeedsBigProcessLock::Yes) \
S(setsid, NeedsBigProcessLock::Yes) \
- S(setsockopt, NeedsBigProcessLock::Yes) \
+ S(setsockopt, NeedsBigProcessLock::No) \
S(setuid, NeedsBigProcessLock::Yes) \
S(shutdown, NeedsBigProcessLock::No) \
S(sigaction, NeedsBigProcessLock::Yes) \
diff --git a/Kernel/Syscalls/socket.cpp b/Kernel/Syscalls/socket.cpp
index 8c76e5164a..4e2247673e 100644
--- a/Kernel/Syscalls/socket.cpp
+++ b/Kernel/Syscalls/socket.cpp
@@ -347,7 +347,7 @@ ErrorOr<FlatPtr> Process::sys$getsockopt(Userspace<Syscall::SC_getsockopt_params
ErrorOr<FlatPtr> Process::sys$setsockopt(Userspace<Syscall::SC_setsockopt_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));
Userspace<void const*> user_value((FlatPtr)params.value);