diff options
author | alc <alc@FreeBSD.org> | 2003-07-30 18:55:04 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-07-30 18:55:04 +0000 |
commit | fc6d1980ccfd4a7b38ccbaf16d7081451124545f (patch) | |
tree | 762918ce56831a079bd2c115a8a21c4c0b555e0b /sys/kern/sys_pipe.c | |
parent | 244ab33e17aca1f32c16bd349d1ba0c830f414fe (diff) | |
download | FreeBSD-src-fc6d1980ccfd4a7b38ccbaf16d7081451124545f.zip FreeBSD-src-fc6d1980ccfd4a7b38ccbaf16d7081451124545f.tar.gz |
The introduction of vm object locking has caused witness to reveal
a long-standing mistake in the way a portion of a pipe's KVA is
allocated. Specifically, kmem_alloc_pageable() is inappropriate
for use in the "direct" case because it allows a preceding vm map entry
and vm object to be extended to support the new KVA allocation.
However, the direct case KVA allocation should not have a backing
vm object. This is corrected by using kmem_alloc_nofault().
Submitted by: tegge (with the above explanation by me)
Diffstat (limited to 'sys/kern/sys_pipe.c')
-rw-r--r-- | sys/kern/sys_pipe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 0b1b69d..8ced29f 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -732,7 +732,7 @@ pipe_build_write_buffer(wpipe, uio) * We need to allocate space for an extra page because the * address range might (will) span pages at times. */ - wpipe->pipe_map.kva = kmem_alloc_pageable(kernel_map, + wpipe->pipe_map.kva = kmem_alloc_nofault(kernel_map, wpipe->pipe_buffer.size + PAGE_SIZE); atomic_add_int(&amountpipekva, wpipe->pipe_buffer.size + PAGE_SIZE); |