Kernel: Remove big lock from sys$rename

This syscall doesn't access any unprotected shared data.
This commit is contained in:
Idan Horowitz 2022-04-09 23:08:46 +03:00 committed by Andreas Kling
parent 5c064d3e8e
commit 165a23b68c
Notes: sideshowbarker 2024-07-17 14:13:08 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -142,7 +142,7 @@ enum class NeedsBigProcessLock {
S(realpath, NeedsBigProcessLock::No) \
S(recvfd, NeedsBigProcessLock::No) \
S(recvmsg, NeedsBigProcessLock::Yes) \
S(rename, NeedsBigProcessLock::Yes) \
S(rename, NeedsBigProcessLock::No) \
S(rmdir, NeedsBigProcessLock::No) \
S(sched_getparam, NeedsBigProcessLock::No) \
S(sched_setparam, NeedsBigProcessLock::No) \

View file

@ -12,7 +12,7 @@ namespace Kernel {
ErrorOr<FlatPtr> Process::sys$rename(Userspace<Syscall::SC_rename_params const*> user_params)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
VERIFY_NO_PROCESS_BIG_LOCK(this)
TRY(require_promise(Pledge::cpath));
auto params = TRY(copy_typed_from_user(user_params));
auto old_path = TRY(get_syscall_path_argument(params.old_path));