From 7543c34d0712c07ab9ba97549063f03b914124e8 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 7 Mar 2022 16:44:12 +0100 Subject: Kernel: Mark sys$anon_create() as not needing the big lock This syscall is already safe for no-big-lock since it doesn't access any unprotected data. --- Kernel/API/Syscall.h | 2 +- Kernel/Syscalls/anon_create.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h index 408f7572e2..9fbd375c79 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -49,7 +49,7 @@ enum class NeedsBigProcessLock { S(adjtime, NeedsBigProcessLock::Yes) \ S(alarm, NeedsBigProcessLock::Yes) \ S(allocate_tls, NeedsBigProcessLock::Yes) \ - S(anon_create, NeedsBigProcessLock::Yes) \ + S(anon_create, NeedsBigProcessLock::No) \ S(beep, NeedsBigProcessLock::No) \ S(bind, NeedsBigProcessLock::Yes) \ S(chdir, NeedsBigProcessLock::Yes) \ diff --git a/Kernel/Syscalls/anon_create.cpp b/Kernel/Syscalls/anon_create.cpp index 0b3fb06c70..2c57148f1e 100644 --- a/Kernel/Syscalls/anon_create.cpp +++ b/Kernel/Syscalls/anon_create.cpp @@ -13,7 +13,7 @@ namespace Kernel { ErrorOr Process::sys$anon_create(size_t size, int options) { - VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this); + VERIFY_NO_PROCESS_BIG_LOCK(this); TRY(require_promise(Pledge::stdio)); if (!size) -- cgit v1.2.3