summaryrefslogtreecommitdiff
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2010-07-02 01:25:07 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2010-07-02 01:25:07 +0000
commit9d117e5e423280482f14797f20b9859c9ac00e9d (patch)
tree2a8ab8f99aec52ff140b81e855394929f7204892 /sys/kern/kern_fork.c
parent477e87fe3970be38615d29544b520bc46fe960e1 (diff)
add an align argument to uvm_km_kmemalloc_pla.
Use uvm_km_kmemalloc_pla with the dma constraint to allocate kernel stacks. Yes, that means DMA is possible to kernel stacks, but only until we've fixed all the scary drivers. deraadt@ ok
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 83989845b69..8e4674cb6bb 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.118 2010/06/30 21:01:45 thib Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.119 2010/07/02 01:25:05 art Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -242,7 +242,9 @@ fork1(struct proc *p1, int exitsig, int flags, void *stack, size_t stacksize,
return (EAGAIN);
}
- uaddr = uvm_km_alloc1(kernel_map, USPACE, USPACE_ALIGN, 1);
+ uaddr = uvm_km_kmemalloc_pla(kernel_map, uvm.kernel_object, USPACE,
+ USPACE_ALIGN, 0, dma_constraint.ucr_low, dma_constraint.ucr_high,
+ 0, 0, USPACE/PAGE_SIZE);
if (uaddr == 0) {
chgproccnt(uid, -1);
nprocs--;