diff options
author | Andreas Kling <kling@serenityos.org> | 2022-04-03 22:06:03 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-03 22:06:03 +0200 |
commit | bc4282c773cf04d981aebde36e3cab4efefe2e7a (patch) | |
tree | 4e4dc80c99558114fde577c59efdc60aacb60082 /Kernel | |
parent | 92dfcdb6b1a738c9925d7650a78ebfcee61b40d5 (diff) | |
download | serenity-bc4282c773cf04d981aebde36e3cab4efefe2e7a.zip |
Kernel: Mark sys$sendfd() and sys$recvfd() as not needing the big lock
These syscalls already perform the necessary locking and don't rely on
the process big lock.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/API/Syscall.h | 4 | ||||
-rw-r--r-- | Kernel/Syscalls/sendfd.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h index de41ae6f73..16c1136840 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -140,13 +140,13 @@ enum class NeedsBigProcessLock { S(readlink, NeedsBigProcessLock::No) \ S(readv, NeedsBigProcessLock::Yes) \ S(realpath, NeedsBigProcessLock::No) \ - S(recvfd, NeedsBigProcessLock::Yes) \ + S(recvfd, NeedsBigProcessLock::No) \ S(recvmsg, NeedsBigProcessLock::Yes) \ S(rename, NeedsBigProcessLock::Yes) \ S(rmdir, NeedsBigProcessLock::Yes) \ S(sched_getparam, NeedsBigProcessLock::Yes) \ S(sched_setparam, NeedsBigProcessLock::Yes) \ - S(sendfd, NeedsBigProcessLock::Yes) \ + S(sendfd, NeedsBigProcessLock::No) \ S(sendmsg, NeedsBigProcessLock::Yes) \ S(set_coredump_metadata, NeedsBigProcessLock::Yes) \ S(set_mmap_name, NeedsBigProcessLock::Yes) \ diff --git a/Kernel/Syscalls/sendfd.cpp b/Kernel/Syscalls/sendfd.cpp index 4ab52dece9..6b306c2433 100644 --- a/Kernel/Syscalls/sendfd.cpp +++ b/Kernel/Syscalls/sendfd.cpp @@ -12,7 +12,7 @@ namespace Kernel { ErrorOr<FlatPtr> Process::sys$sendfd(int sockfd, int fd) { - VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) + VERIFY_NO_PROCESS_BIG_LOCK(this) TRY(require_promise(Pledge::sendfd)); auto socket_description = TRY(open_file_description(sockfd)); if (!socket_description->is_socket()) @@ -31,7 +31,7 @@ ErrorOr<FlatPtr> Process::sys$sendfd(int sockfd, int fd) ErrorOr<FlatPtr> Process::sys$recvfd(int sockfd, int options) { - VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) + VERIFY_NO_PROCESS_BIG_LOCK(this) TRY(require_promise(Pledge::recvfd)); auto socket_description = TRY(open_file_description(sockfd)); if (!socket_description->is_socket()) |