summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-03-28 17:28:36 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-03-28 17:28:36 +0000
commit06c9fb77afa454eda0607a084cbe6595d99c9322 (patch)
tree52476f58729dcca302d7547bcc2fcfc456ff506d /sys/arch
parent87a9101fcd813ecbc0dbb9583c0442373275bf27 (diff)
Reset ci_curmap to kernel_pmap() in cpu_hatch(). Otherwise the lazy pmap
switching code might think the old pmap is still active after a resume which could lead to a page fault in the kernel. ok stsp@, mlarkin@, deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/cpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c
index 3ce489a5531..b454da2b630 100644
--- a/sys/arch/i386/i386/cpu.c
+++ b/sys/arch/i386/i386/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.80 2016/10/21 06:20:58 mlarkin Exp $ */
+/* $OpenBSD: cpu.c,v 1.81 2017/03/28 17:28:35 kettenis Exp $ */
/* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */
/*-
@@ -603,6 +603,7 @@ cpu_hatch(void *v)
npxinit(ci);
+ ci->ci_curpmap = pmap_kernel();
cpu_init(ci);
/* Re-initialise memory range handling on AP */