summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-04-09 22:44:01 +0300
committerAndreas Kling <kling@serenityos.org>2022-04-09 23:46:02 +0200
commit8458313e8a39a6fe67664551d7faaf6dae3eb1f0 (patch)
tree48ac14e9e758254b8c9c50c2188a4d646e4dbb4d /Kernel
parentf986a3b886afd241e4204dfd07610cf8229c495f (diff)
downloadserenity-8458313e8a39a6fe67664551d7faaf6dae3eb1f0.zip
Kernel: Remove big lock from sys$fchown
This syscall doesn't access any unprotected shared data.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/API/Syscall.h2
-rw-r--r--Kernel/Syscalls/chown.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index 4fc3c2716b..ded692e127 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -69,7 +69,7 @@ enum class NeedsBigProcessLock {
S(exit_thread, NeedsBigProcessLock::Yes) \
S(fchdir, NeedsBigProcessLock::No) \
S(fchmod, NeedsBigProcessLock::No) \
- S(fchown, NeedsBigProcessLock::Yes) \
+ S(fchown, NeedsBigProcessLock::No) \
S(fcntl, NeedsBigProcessLock::Yes) \
S(fork, NeedsBigProcessLock::Yes) \
S(fstat, NeedsBigProcessLock::No) \
diff --git a/Kernel/Syscalls/chown.cpp b/Kernel/Syscalls/chown.cpp
index 797804da87..97ba35a21e 100644
--- a/Kernel/Syscalls/chown.cpp
+++ b/Kernel/Syscalls/chown.cpp
@@ -13,7 +13,7 @@ namespace Kernel {
ErrorOr<FlatPtr> Process::sys$fchown(int fd, UserID uid, GroupID gid)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::chown));
auto description = TRY(open_file_description(fd));
TRY(description->chown(uid, gid));