diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-07-18 11:27:13 -0700 |
---|---|---|
committer | Gunnar Beutner <gunnar@beutner.name> | 2021-07-20 03:21:14 +0200 |
commit | 10ce896d4fff1fda789c860f8d6594c2dd5f4020 (patch) | |
tree | e37a566298dd7cd32b02432fc7c4918b793aeff1 /Kernel | |
parent | 9201a0602706a463d65ecf4b3623235f1f82cd03 (diff) | |
download | serenity-10ce896d4fff1fda789c860f8d6594c2dd5f4020.zip |
Kernel: Disable big process lock in sys$gethostname() sys$sethostname()
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/API/Syscall.h | 4 | ||||
-rw-r--r-- | Kernel/Syscalls/hostname.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h index a0f63d6337..2cb54555df 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -64,8 +64,8 @@ enum class NeedsBigProcessLock { S(get_dir_entries, NeedsBigProcessLock::Yes) \ S(getcwd, NeedsBigProcessLock::Yes) \ S(gettimeofday, NeedsBigProcessLock::Yes) \ - S(gethostname, NeedsBigProcessLock::Yes) \ - S(sethostname, NeedsBigProcessLock::Yes) \ + S(gethostname, NeedsBigProcessLock::No) \ + S(sethostname, NeedsBigProcessLock::No) \ S(chdir, NeedsBigProcessLock::Yes) \ S(uname, NeedsBigProcessLock::Yes) \ S(set_mmap_name, NeedsBigProcessLock::Yes) \ diff --git a/Kernel/Syscalls/hostname.cpp b/Kernel/Syscalls/hostname.cpp index 14f9f697b8..2d9376ddbc 100644 --- a/Kernel/Syscalls/hostname.cpp +++ b/Kernel/Syscalls/hostname.cpp @@ -13,7 +13,7 @@ extern Mutex* g_hostname_lock; KResultOr<FlatPtr> Process::sys$gethostname(Userspace<char*> buffer, size_t size) { - VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) + VERIFY_NO_PROCESS_BIG_LOCK(this) REQUIRE_PROMISE(stdio); if (size > NumericLimits<ssize_t>::max()) return EINVAL; @@ -27,7 +27,7 @@ KResultOr<FlatPtr> Process::sys$gethostname(Userspace<char*> buffer, size_t size KResultOr<FlatPtr> Process::sys$sethostname(Userspace<const char*> hostname, size_t length) { - VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) + VERIFY_NO_PROCESS_BIG_LOCK(this) REQUIRE_NO_PROMISES; if (!is_superuser()) return EPERM; |