summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
Diffstat (limited to 'vm')
-rw-r--r--vm/vm_user.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vm/vm_user.c b/vm/vm_user.c
index 7f706d71..c6dbda68 100644
--- a/vm/vm_user.c
+++ b/vm/vm_user.c
@@ -604,6 +604,11 @@ kern_return_t vm_allocate_contiguous(
if (palign != PAGE_SIZE)
return KERN_INVALID_ARGUMENT;
+#ifdef USER32
+ if (pmax > 0x100000000ULL)
+ pmax = 0x100000000ULL;
+#endif
+
selector = VM_PAGE_SEL_DMA;
if (pmax > VM_PAGE_DMA_LIMIT)
#ifdef VM_PAGE_DMA32_LIMIT