summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_km.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-09-26 17:55:01 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-09-26 17:55:01 +0000
commit8314b4626b5c4c8db28473f392d0cb5e0e10a14a (patch)
treeb7a8b702c0d96ed6dc3c70980f50df0a060a69bc /sys/uvm/uvm_km.c
parent872b71c53a517f2ad357fda6793473a83ea2cfd6 (diff)
Protect the list of free map entries with a mutex. This should fix the
crashes seen by sthen@ on i386. ok visa@, guenther@, tedu@
Diffstat (limited to 'sys/uvm/uvm_km.c')
-rw-r--r--sys/uvm/uvm_km.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c
index 96ba63600bc..f76bd87c493 100644
--- a/sys/uvm/uvm_km.c
+++ b/sys/uvm/uvm_km.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_km.c,v 1.127 2015/09/17 18:04:49 kettenis Exp $ */
+/* $OpenBSD: uvm_km.c,v 1.128 2015/09/26 17:55:00 kettenis Exp $ */
/* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */
/*
@@ -703,6 +703,8 @@ uvm_km_thread(void *arg)
int flags;
struct uvm_km_free_page *fp = NULL;
+ KERNEL_UNLOCK();
+
for (;;) {
mtx_enter(&uvm_km_pages.mtx);
if (uvm_km_pages.free >= uvm_km_pages.lowat &&