summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-07 16:44:12 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-08 00:19:49 +0100
commit7543c34d0712c07ab9ba97549063f03b914124e8 (patch)
tree7b8a6c47d1c5ae32f98a4321519180acceb6f447
parent8165346ae4ab1fbc05a5fc3d2f05427dce7f8c90 (diff)
downloadserenity-7543c34d0712c07ab9ba97549063f03b914124e8.zip
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.
-rw-r--r--Kernel/API/Syscall.h2
-rw-r--r--Kernel/Syscalls/anon_create.cpp2
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<FlatPtr> 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)