From e71b84228edc3ddd5c0683eeddd5bed3214cd41e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 3 Apr 2023 18:39:07 +0200 Subject: Kernel: Mark sys$kill as not needing the big lock This syscall sends a signal to other threads or itself. This mechanism is already guarded by locking mechanisms, and widely used within the kernel without help from the big lock. --- Kernel/API/Syscall.h | 2 +- Kernel/Syscalls/kill.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Kernel') diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h index c2f1d6d456..f87259a7ae 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -115,7 +115,7 @@ enum class NeedsBigProcessLock { S(join_thread, NeedsBigProcessLock::Yes) \ S(jail_create, NeedsBigProcessLock::No) \ S(jail_attach, NeedsBigProcessLock::No) \ - S(kill, NeedsBigProcessLock::Yes) \ + S(kill, NeedsBigProcessLock::No) \ S(kill_thread, NeedsBigProcessLock::Yes) \ S(killpg, NeedsBigProcessLock::Yes) \ S(link, NeedsBigProcessLock::No) \ diff --git a/Kernel/Syscalls/kill.cpp b/Kernel/Syscalls/kill.cpp index ba8e4e805e..d9ba3b3d50 100644 --- a/Kernel/Syscalls/kill.cpp +++ b/Kernel/Syscalls/kill.cpp @@ -102,7 +102,7 @@ ErrorOr Process::do_killself(int signal) ErrorOr Process::sys$kill(pid_t pid_or_pgid, int signal) { - VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this); + VERIFY_NO_PROCESS_BIG_LOCK(this); if (pid_or_pgid == pid().value()) TRY(require_promise(Pledge::stdio)); else -- cgit v1.2.3