summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-07 17:57:55 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-08 00:19:49 +0100
commit7597bef771274d3a02510d08a332c1a7a647b2dd (patch)
treed42c989bc08346ee2bcf734211b20552a20d93b7
parentf630d0f095552196199c7334973f57dd7d44f352 (diff)
downloadserenity-7597bef771274d3a02510d08a332c1a7a647b2dd.zip
Kernel: Mark sys$getcwd() 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.h2
-rw-r--r--Kernel/Syscalls/chdir.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index fc59cbe901..338f43c247 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -85,7 +85,7 @@ enum class NeedsBigProcessLock {
S(get_process_name, NeedsBigProcessLock::Yes) \
S(get_stack_bounds, NeedsBigProcessLock::No) \
S(get_thread_name, NeedsBigProcessLock::Yes) \
- S(getcwd, NeedsBigProcessLock::Yes) \
+ S(getcwd, NeedsBigProcessLock::No) \
S(getegid, NeedsBigProcessLock::Yes) \
S(geteuid, NeedsBigProcessLock::Yes) \
S(getgid, NeedsBigProcessLock::Yes) \
diff --git a/Kernel/Syscalls/chdir.cpp b/Kernel/Syscalls/chdir.cpp
index c60183a447..e109749c6a 100644
--- a/Kernel/Syscalls/chdir.cpp
+++ b/Kernel/Syscalls/chdir.cpp
@@ -38,7 +38,7 @@ ErrorOr<FlatPtr> Process::sys$fchdir(int fd)
ErrorOr<FlatPtr> Process::sys$getcwd(Userspace<char*> buffer, size_t size)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::rpath));
if (size > NumericLimits<ssize_t>::max())