summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-04-03 13:28:50 +0200
committerAndreas Kling <kling@serenityos.org>2023-04-04 10:33:42 +0200
commit775e6d6865a2e74235d3811572982a73bba4cbc5 (patch)
tree24352a602f1383efbd461e5ece1db1834e8df97d /Kernel
parent6132193bd43423c18c6ab8bff008946100b6afaf (diff)
downloadserenity-775e6d6865a2e74235d3811572982a73bba4cbc5.zip
Kernel: Mark sys$fcntl as not needing the big lock
This syscall operates on the file descriptor table, and on individual open file descriptions. Both of those are already protected by scoped locking mechanisms.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/API/Syscall.h2
-rw-r--r--Kernel/Syscalls/fcntl.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index 708e547e83..0ea820c6d9 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -77,7 +77,7 @@ enum class NeedsBigProcessLock {
S(fchdir, NeedsBigProcessLock::No) \
S(fchmod, NeedsBigProcessLock::No) \
S(fchown, NeedsBigProcessLock::No) \
- S(fcntl, NeedsBigProcessLock::Yes) \
+ S(fcntl, NeedsBigProcessLock::No) \
S(fork, NeedsBigProcessLock::Yes) \
S(fstat, NeedsBigProcessLock::No) \
S(fstatvfs, NeedsBigProcessLock::No) \
diff --git a/Kernel/Syscalls/fcntl.cpp b/Kernel/Syscalls/fcntl.cpp
index 4523f969cb..81dcef7325 100644
--- a/Kernel/Syscalls/fcntl.cpp
+++ b/Kernel/Syscalls/fcntl.cpp
@@ -12,7 +12,7 @@ namespace Kernel {
ErrorOr<FlatPtr> Process::sys$fcntl(int fd, int cmd, uintptr_t arg)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::stdio));
dbgln_if(IO_DEBUG, "sys$fcntl: fd={}, cmd={}, arg={}", fd, cmd, arg);
auto description = TRY(open_file_description(fd));