summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-04-03 16:00:17 +0200
committerAndreas Kling <kling@serenityos.org>2023-04-04 10:33:42 +0200
commita7212a748846630190ca54080e11e1db73b3a11a (patch)
tree10e0b7320d23d88fc1ce7b3e34170da2aab65bb2
parent97ac4601f5dca698550c5080cc8eb163ba01711d (diff)
downloadserenity-a7212a748846630190ca54080e11e1db73b3a11a.zip
Kernel: Mark sys$open as not needing the big lock
All the individual sub-operations of this syscall are protected by their own locking mechanisms, so it should be okay to get it off the big lock.
-rw-r--r--Kernel/API/Syscall.h2
-rw-r--r--Kernel/Syscalls/open.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index de3985fe98..f35368208a 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -131,7 +131,7 @@ enum class NeedsBigProcessLock {
S(mremap, NeedsBigProcessLock::Yes) \
S(msync, NeedsBigProcessLock::Yes) \
S(munmap, NeedsBigProcessLock::Yes) \
- S(open, NeedsBigProcessLock::Yes) \
+ S(open, NeedsBigProcessLock::No) \
S(perf_event, NeedsBigProcessLock::Yes) \
S(perf_register_string, NeedsBigProcessLock::Yes) \
S(pipe, NeedsBigProcessLock::No) \
diff --git a/Kernel/Syscalls/open.cpp b/Kernel/Syscalls/open.cpp
index 740d5255cd..2ea0cc1e80 100644
--- a/Kernel/Syscalls/open.cpp
+++ b/Kernel/Syscalls/open.cpp
@@ -16,7 +16,7 @@ namespace Kernel {
ErrorOr<FlatPtr> Process::sys$open(Userspace<Syscall::SC_open_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));
int dirfd = params.dirfd;