summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-04-09 22:51:14 +0300
committerAndreas Kling <kling@serenityos.org>2022-04-09 23:46:02 +0200
commite620487b6621ecdcd7c4fb24100f72b8d492c680 (patch)
tree32891c3f7e0c01c798f115d857112c97583b4366
parent9547a8e8a291b7b3f7a633fe835be8031f4f6d5d (diff)
downloadserenity-e620487b6621ecdcd7c4fb24100f72b8d492c680.zip
Kernel: Remove big lock from sys$connect
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 45cc3ed771..e8b7017091 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -55,7 +55,7 @@ enum class NeedsBigProcessLock {
S(clock_nanosleep, NeedsBigProcessLock::No) \
S(clock_settime, NeedsBigProcessLock::No) \
S(close, NeedsBigProcessLock::No) \
- S(connect, NeedsBigProcessLock::Yes) \
+ S(connect, NeedsBigProcessLock::No) \
S(create_inode_watcher, NeedsBigProcessLock::Yes) \
S(create_thread, NeedsBigProcessLock::Yes) \
S(dbgputstr, NeedsBigProcessLock::No) \
diff --git a/Kernel/Syscalls/socket.cpp b/Kernel/Syscalls/socket.cpp
index e73fd9d594..e15dccaf91 100644
--- a/Kernel/Syscalls/socket.cpp
+++ b/Kernel/Syscalls/socket.cpp
@@ -145,7 +145,7 @@ ErrorOr<FlatPtr> Process::sys$accept4(Userspace<Syscall::SC_accept4_params const
ErrorOr<FlatPtr> Process::sys$connect(int sockfd, Userspace<sockaddr const*> user_address, socklen_t user_address_size)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
+ VERIFY_NO_PROCESS_BIG_LOCK(this)
auto description = TRY(open_file_description(sockfd));
if (!description->is_socket())