From 9c1ee8cbd1473cfa1ceb613e8f90e8509f6579a6 Mon Sep 17 00:00:00 2001 From: James Bellamy Date: Sun, 21 Aug 2022 15:59:31 +0100 Subject: [PATCH] Kernel: Remove big lock from sys$socket With the implementation of the credentials object the socket syscall no longer needs the big lock. --- 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 df2936d2c53..8e81e9dc3a7 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -174,7 +174,7 @@ enum class NeedsBigProcessLock { S(sigreturn, NeedsBigProcessLock::Yes) \ S(sigsuspend, NeedsBigProcessLock::Yes) \ S(sigtimedwait, NeedsBigProcessLock::Yes) \ - S(socket, NeedsBigProcessLock::Yes) \ + S(socket, NeedsBigProcessLock::No) \ S(socketpair, NeedsBigProcessLock::No) \ S(stat, NeedsBigProcessLock::No) \ S(statvfs, NeedsBigProcessLock::No) \ diff --git a/Kernel/Syscalls/socket.cpp b/Kernel/Syscalls/socket.cpp index dbff7d7f9e8..65bdb4e7596 100644 --- a/Kernel/Syscalls/socket.cpp +++ b/Kernel/Syscalls/socket.cpp @@ -33,7 +33,7 @@ static void setup_socket_fd(Process::OpenFileDescriptions& fds, int fd, NonnullL ErrorOr Process::sys$socket(int domain, int type, int protocol) { - VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this); + VERIFY_NO_PROCESS_BIG_LOCK(this); REQUIRE_PROMISE_FOR_SOCKET_DOMAIN(domain); auto credentials = this->credentials();