diff --git a/kernel/src/sys/allocate_memory.cpp b/kernel/src/sys/allocate_memory.cpp index 84083cc7..5203d551 100644 --- a/kernel/src/sys/allocate_memory.cpp +++ b/kernel/src/sys/allocate_memory.cpp @@ -33,6 +33,7 @@ Result sys_allocate_memory(Registers*, SyscallArgs args) int mmu_flags = MMU::User | MMU::NoExecute; if (flags & PROT_WRITE) mmu_flags |= MMU::ReadWrite; if (flags & PROT_EXEC) mmu_flags &= ~MMU::NoExecute; + if (flags == PROT_NONE) mmu_flags = MMU::NoExecute; kdbgln("allocate_memory: allocating memory at %#lx", address);