summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-05-04 05:52:29 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-05-04 05:52:29 +0000
commit68f77dc4f4db627cef2b25bdd3be58fdd7463014 (patch)
tree0cd3b8b0bd0d8e9b87b3812262a357fa9ff9f2f5
parentbd87afc06722af632f27eade876798041a856533 (diff)
Skip the kernel pmap when accounting for executability range changes.
This could lead to some heavy problems if called from kernel threads (which is the only way to get past the next test with the kernel pmap). From mickey. art@ toby@ ok.
-rw-r--r--sys/arch/i386/i386/pmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index 7a4ae7c0ba9..6da351b9adf 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.108 2007/05/03 05:32:05 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.109 2007/05/04 05:52:28 art Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
@@ -644,6 +644,9 @@ void
pmap_exec_account(struct pmap *pm, vaddr_t va,
pt_entry_t opte, pt_entry_t npte)
{
+ if (pm == pmap_kernel())
+ return;
+
if (curproc == NULL || curproc->p_vmspace == NULL ||
pm != vm_map_pmap(&curproc->p_vmspace->vm_map))
return;