From 5a96260e250d466257d59067f653fec393d3eec5 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Sat, 9 Apr 2022 23:01:59 +0300 Subject: Kernel: Remove big lock from sys$setsockopt This syscall doesn't access any unprotected shared data. --- Kernel/API/Syscall.h | 2 +- Kernel/Syscalls/socket.cpp | 2 +- 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 Process::sys$getsockopt(Userspace Process::sys$setsockopt(Userspace user_params) { - VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) + VERIFY_NO_PROCESS_BIG_LOCK(this) auto params = TRY(copy_typed_from_user(user_params)); Userspace user_value((FlatPtr)params.value); -- cgit v1.2.3