Kernel: Mark sys$fchmod() as not needing the big lock

This syscall doesn't access any data that was implicitly protected by
the big lock.
This commit is contained in:
Andreas Kling 2022-03-08 16:32:29 +01:00
parent d074aae422
commit aa381c4a67
Notes: sideshowbarker 2024-07-17 17:40:30 +09:00
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ enum class NeedsBigProcessLock {
S(exit, NeedsBigProcessLock::Yes) \
S(exit_thread, NeedsBigProcessLock::Yes) \
S(fchdir, NeedsBigProcessLock::No) \
S(fchmod, NeedsBigProcessLock::Yes) \
S(fchmod, NeedsBigProcessLock::No) \
S(fchown, NeedsBigProcessLock::Yes) \
S(fcntl, NeedsBigProcessLock::Yes) \
S(fork, NeedsBigProcessLock::Yes) \

View File

@ -34,7 +34,7 @@ ErrorOr<FlatPtr> Process::sys$chmod(Userspace<Syscall::SC_chmod_params const*> u
ErrorOr<FlatPtr> Process::sys$fchmod(int fd, mode_t mode)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::fattr));
auto description = TRY(open_file_description(fd));
TRY(description->chmod(mode));