vmapbuf() does not tolerate failure to get virtual space, use UVM_KMF_WAITVA.

This commit is contained in:
chs 2006-03-30 04:07:13 +00:00
parent 60b21d1590
commit 788c9819d4
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.90 2005/12/24 07:37:18 christos Exp $ */
/* $NetBSD: vm_machdep.c,v 1.91 2006/03/30 04:07:13 chs Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.90 2005/12/24 07:37:18 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.91 2006/03/30 04:07:13 chs Exp $");
#include "opt_compat_ultrix.h"
#include "opt_multiprocessor.h"
@ -321,7 +321,7 @@ vmapbuf(bp, len)
faddr = trunc_page((vaddr_t)bp->b_saveaddr);
off = (vaddr_t)bp->b_data - faddr;
len = round_page(off + len);
taddr = uvm_km_alloc(phys_map, len, 0, UVM_KMF_VAONLY);
taddr = uvm_km_alloc(phys_map, len, 0, UVM_KMF_VAONLY | UVM_KMF_WAITVA);
bp->b_data = (caddr_t)(taddr + off);
len = atop(len);
while (len--) {