From 0be79f9bc23ec739219cf4d3abeaf538364a534d Mon Sep 17 00:00:00 2001 From: Liav A Date: Fri, 26 May 2023 13:58:31 +0300 Subject: [PATCH] Kernel: Mark sys$umount as not needing the big lock All accesses to the mount table are already serialized by the actual spinlock of that table. --- Kernel/API/Syscall.h | 2 +- Kernel/Syscalls/mount.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h index ccf039da33..afa6fc57f0 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -193,7 +193,7 @@ enum class NeedsBigProcessLock { S(sysconf, NeedsBigProcessLock::No) \ S(times, NeedsBigProcessLock::No) \ S(umask, NeedsBigProcessLock::No) \ - S(umount, NeedsBigProcessLock::Yes) \ + S(umount, NeedsBigProcessLock::No) \ S(uname, NeedsBigProcessLock::No) \ S(unlink, NeedsBigProcessLock::No) \ S(unveil, NeedsBigProcessLock::No) \ diff --git a/Kernel/Syscalls/mount.cpp b/Kernel/Syscalls/mount.cpp index c8387b4d84..e945515141 100644 --- a/Kernel/Syscalls/mount.cpp +++ b/Kernel/Syscalls/mount.cpp @@ -161,7 +161,7 @@ ErrorOr Process::sys$bindmount(Userspace Process::sys$umount(Userspace user_mountpoint, size_t mountpoint_length) { - VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this); + VERIFY_NO_PROCESS_BIG_LOCK(this); auto credentials = this->credentials(); if (!credentials->is_superuser()) return EPERM;