From a7212a748846630190ca54080e11e1db73b3a11a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 3 Apr 2023 16:00:17 +0200 Subject: [PATCH] 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. --- Kernel/API/Syscall.h | 2 +- Kernel/Syscalls/open.cpp | 2 +- 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 Process::sys$open(Userspace 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;