summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-04-29 15:46:43 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-04-29 15:46:43 +0000
commit9cd34d823384c1dac0abdfd009da6d8be68e43e5 (patch)
treebe5e35af9b6dd2ee49e965c752dc0643315c552e
parent7a0dce346ee39f408ae9fad155d10acb5122afdd (diff)
Change the loop test in uvm_km_kmemalloc from '<' to '!='. Everything
is aligned just fine and in case we allocate the last piece of the address space we don't want wrap-around to cause us to fail. pointed out by and ok miod@
-rw-r--r--sys/uvm/uvm_km.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c
index 004def20218..f854f418faf 100644
--- a/sys/uvm/uvm_km.c
+++ b/sys/uvm/uvm_km.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_km.c,v 1.62 2007/04/27 07:45:30 art Exp $ */
+/* $OpenBSD: uvm_km.c,v 1.63 2007/04/29 15:46:42 art Exp $ */
/* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */
/*
@@ -392,7 +392,7 @@ uvm_km_kmemalloc(struct vm_map *map, struct uvm_object *obj, vsize_t size,
*/
loopva = kva;
- while (loopva < kva + size) {
+ while (loopva != kva + size) {
pg = uvm_pagealloc(obj, offset, NULL, 0);
if (pg) {
atomic_clearbits_int(&pg->pg_flags, PG_BUSY);