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)
This commit is contained in:
Alan Cox 2003-07-30 18:55:04 +00:00
parent 7a34a70b8d
commit 93b4c5b707

View File

@ -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);