Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Fix PR/51288 reproducable panic on evbmip...
details: https://anonhg.NetBSD.org/src/rev/d17236f8efae
branches: trunk
changeset: 346148:d17236f8efae
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Jun 28 09:31:15 2016 +0000
description:
Fix PR/51288 reproducable panic on evbmips64-eb (erlite)
pmap_page_remove from the previous change neglected to terminate the pv
list correctly when it started with an initial unmanaged mapping and
subsequent managed mappings. Fix this.
diffstat:
sys/arch/mips/mips/pmap.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (55 lines):
diff -r 62aaabebeca0 -r d17236f8efae sys/arch/mips/mips/pmap.c
--- a/sys/arch/mips/mips/pmap.c Tue Jun 28 09:27:26 2016 +0000
+++ b/sys/arch/mips/mips/pmap.c Tue Jun 28 09:31:15 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.221 2016/06/27 07:12:18 skrll Exp $ */
+/* $NetBSD: pmap.c,v 1.222 2016/06/28 09:31:15 skrll Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.221 2016/06/27 07:12:18 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.222 2016/06/28 09:31:15 skrll Exp $");
/*
* Manages physical address maps.
@@ -2327,6 +2327,11 @@
__func__, pv, pv->pv_pmap, pv->pv_va);
}
#endif
+ KASSERT(pv->pv_pmap == pmap_kernel());
+
+ /* Assume no more - it'll get fixed if there are */
+ pv->pv_next = NULL;
+
/*
* pvp is non-null when we already have a PV_KENTER
* pv in pvh_first; otherwise we haven't seen a
@@ -2342,14 +2347,12 @@
} else {
pv_entry_t fpv = &md->pvh_first;
*fpv = *pv;
+ KASSERT(fpv->pv_pmap == pmap_kernel());
}
- /* Assume no more - it'll get fixed if there are */
- pv->pv_next = NULL;
pvp = pv;
continue;
}
-
const pmap_t pmap = pv->pv_pmap;
vaddr_t va = trunc_page(pv->pv_va);
pt_entry_t *pte = pmap_pte(pmap, va);
@@ -2385,6 +2388,8 @@
* free it.
*/
if (pvp) {
+ KASSERT(pvp->pv_pmap == pmap_kernel());
+ KASSERT(pvp->pv_next == NULL);
pmap_pv_free(pv);
} else {
pv->pv_pmap = NULL;
Home |
Main Index |
Thread Index |
Old Index