diff options
author | 2008-10-28 20:16:58 +0000 | |
---|---|---|
committer | 2008-10-28 20:16:58 +0000 | |
commit | e25b94e7411f11b67465896e3d7d955e4d04e406 (patch) | |
tree | 6e5cf48291aa8a26f7041d79f4b4cd40d6724ab6 | |
parent | NewUser and NewGroup are subclasses of NewAuth (diff) | |
download | wireguard-openbsd-e25b94e7411f11b67465896e3d7d955e4d04e406.tar.xz wireguard-openbsd-e25b94e7411f11b67465896e3d7d955e4d04e406.zip |
Do not leave pmap_cache_state pointing to freed memory if it was the
last process running.
-rw-r--r-- | sys/arch/arm/arm/pmap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/arm/arm/pmap.c b/sys/arch/arm/arm/pmap.c index ba43c9042fe..3a8ecd90059 100644 --- a/sys/arch/arm/arm/pmap.c +++ b/sys/arch/arm/arm/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.18 2008/10/23 23:54:02 tedu Exp $ */ +/* $OpenBSD: pmap.c,v 1.19 2008/10/28 20:16:58 drahn Exp $ */ /* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */ /* @@ -249,6 +249,7 @@ struct pmap kernel_pmap_store; * XXXSCW: Fix for SMP ... */ union pmap_cache_state *pmap_cache_state; +union pmap_cache_state pmap_deadproc_cache_state; /* * Pool and cache that pmap structures are allocated from. @@ -3204,6 +3205,9 @@ pmap_destroy(pmap_t pm) LIST_REMOVE(pm, pm_list); + if (pmap_cache_state == &pm->pm_cstate) + pmap_cache_state = &pmap_deadproc_cache_state; + pmap_free_l1(pm); /* return the pmap to the pool */ |