summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls
diff options
context:
space:
mode:
authorgggggg-gggggg <88845056+gggggg-gggggg@users.noreply.github.com>2022-07-03 01:02:45 +0200
committerAndreas Kling <kling@serenityos.org>2022-07-10 20:09:11 +0200
commitd728017578c18ebcf6af9a6da8182ee15a597f75 (patch)
tree1610890afdd5e0809c984374c7256e0463dfa14d /Kernel/Syscalls
parent656528f483f6d6bda3d17f035f5690b18b960f2a (diff)
downloadserenity-d728017578c18ebcf6af9a6da8182ee15a597f75.zip
Kernel+LibC+LibCore: Pass fcntl extra argument as pointer-sized variable
The extra argument to fcntl is a pointer in the case of F_GETLK/F_SETLK and we were pulling out a u32, leading to pointer truncation on x86_64. Among other things, this fixes Assistant on x86_64 :^)
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r--Kernel/Syscalls/fcntl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/fcntl.cpp b/Kernel/Syscalls/fcntl.cpp
index 80c0f39373..8b9d9b0a95 100644
--- a/Kernel/Syscalls/fcntl.cpp
+++ b/Kernel/Syscalls/fcntl.cpp
@@ -10,7 +10,7 @@
namespace Kernel {
-ErrorOr<FlatPtr> Process::sys$fcntl(int fd, int cmd, u32 arg)
+ErrorOr<FlatPtr> Process::sys$fcntl(int fd, int cmd, uintptr_t arg)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
TRY(require_promise(Pledge::stdio));