summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-08 16:39:58 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-09 16:43:00 +0100
commit7b3642d08c11db7b02f205a8b649b5ffcc609bf2 (patch)
tree19aa2864b9710d836c17754959a9dd014b5caab3 /Kernel
parent09e644f0ba6c6cc637bb00863bbce12b8ab03850 (diff)
downloadserenity-7b3642d08c11db7b02f205a8b649b5ffcc609bf2.zip
Kernel: Mark sys$lseek() as not needing the big lock
This syscall doesn't access any data that was implicitly protected by the big lock.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/API/Syscall.h2
-rw-r--r--Kernel/Syscalls/lseek.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index 5a95696a72..ab809805a4 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -111,7 +111,7 @@ enum class NeedsBigProcessLock {
S(killpg, NeedsBigProcessLock::Yes) \
S(link, NeedsBigProcessLock::Yes) \
S(listen, NeedsBigProcessLock::Yes) \
- S(lseek, NeedsBigProcessLock::Yes) \
+ S(lseek, NeedsBigProcessLock::No) \
S(madvise, NeedsBigProcessLock::Yes) \
S(map_time_page, NeedsBigProcessLock::Yes) \
S(mkdir, NeedsBigProcessLock::Yes) \
diff --git a/Kernel/Syscalls/lseek.cpp b/Kernel/Syscalls/lseek.cpp
index 2422dce950..52e15bef50 100644
--- a/Kernel/Syscalls/lseek.cpp
+++ b/Kernel/Syscalls/lseek.cpp
@@ -11,7 +11,7 @@ namespace Kernel {
ErrorOr<FlatPtr> Process::sys$lseek(int fd, Userspace<off_t*> userspace_offset, int whence)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::stdio));
auto description = TRY(open_file_description(fd));
off_t offset;