From fc6d1980ccfd4a7b38ccbaf16d7081451124545f Mon Sep 17 00:00:00 2001 From: alc Date: Wed, 30 Jul 2003 18:55:04 +0000 Subject: 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) --- sys/kern/sys_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/sys_pipe.c') 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); -- cgit v1.1