diff --git a/Kernel/Syscalls/mmap.cpp b/Kernel/Syscalls/mmap.cpp index 543c1b0189a..eaf0f5c1b51 100644 --- a/Kernel/Syscalls/mmap.cpp +++ b/Kernel/Syscalls/mmap.cpp @@ -564,6 +564,9 @@ int Process::sys$msyscall(void* address) if (!region) return -EINVAL; + if (!region->is_mmap()) + return -EINVAL; + region->set_syscall_region(true); return 0; }