diff options
author | Andreas Kling <kling@serenityos.org> | 2022-03-07 17:44:27 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-08 00:19:49 +0100 |
commit | f630d0f095552196199c7334973f57dd7d44f352 (patch) | |
tree | df14dd4a283aeac25a6270da6a3767871b2941ee | |
parent | 580d89f0930460d914b2cd617675a3f57fc7ea42 (diff) | |
download | serenity-f630d0f095552196199c7334973f57dd7d44f352.zip |
Kernel: Mark sys$realpath() as not needing the big lock
This syscall doesn't access any data that was implicitly protected by
the big lock.
-rw-r--r-- | Kernel/API/Syscall.h | 2 | ||||
-rw-r--r-- | Kernel/Syscalls/realpath.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h index 9fbd375c79..fc59cbe901 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -144,7 +144,7 @@ enum class NeedsBigProcessLock { S(pread, NeedsBigProcessLock::Yes) \ S(readlink, NeedsBigProcessLock::Yes) \ S(readv, NeedsBigProcessLock::Yes) \ - S(realpath, NeedsBigProcessLock::Yes) \ + S(realpath, NeedsBigProcessLock::No) \ S(recvfd, NeedsBigProcessLock::Yes) \ S(recvmsg, NeedsBigProcessLock::Yes) \ S(rename, NeedsBigProcessLock::Yes) \ diff --git a/Kernel/Syscalls/realpath.cpp b/Kernel/Syscalls/realpath.cpp index e1feed2eb7..bda04d2e8a 100644 --- a/Kernel/Syscalls/realpath.cpp +++ b/Kernel/Syscalls/realpath.cpp @@ -13,7 +13,7 @@ namespace Kernel { ErrorOr<FlatPtr> Process::sys$realpath(Userspace<const Syscall::SC_realpath_params*> user_params) { - VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) + VERIFY_NO_PROCESS_BIG_LOCK(this); TRY(require_promise(Pledge::rpath)); auto params = TRY(copy_typed_from_user(user_params)); |