summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_km.c
diff options
context:
space:
mode:
authorjan <jan@cvs.openbsd.org>2020-05-23 06:15:10 +0000
committerjan <jan@cvs.openbsd.org>2020-05-23 06:15:10 +0000
commita88d3f7efed36bcd580cb70555d92be4f92c75b0 (patch)
treed3fcd60695bab555b64d339f0f14396262326827 /sys/uvm/uvm_km.c
parent875a34fb5df9004805cc0bf0de8a10d29619ba0c (diff)
Prevent km_alloc() from returning garbage if pagelist is empty.
ok bluhm@, visa@
Diffstat (limited to 'sys/uvm/uvm_km.c')
-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 cf5fca0e957..079a89c5837 100644
--- a/sys/uvm/uvm_km.c
+++ b/sys/uvm/uvm_km.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_km.c,v 1.136 2020/02/18 12:13:40 mpi Exp $ */
+/* $OpenBSD: uvm_km.c,v 1.137 2020/05/23 06:15:09 jan Exp $ */
/* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */
/*
@@ -816,7 +816,7 @@ km_alloc(size_t sz, const struct kmem_va_mode *kv,
paddr_t pla_align;
int pla_flags;
int pla_maxseg;
- vaddr_t va, sva;
+ vaddr_t va, sva = 0;
KASSERT(sz == round_page(sz));