NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/49691: KASSERT(l->l_md.md_gc_ptp == NULL) failed on NetBSD/amd64 7.0_BETA
The following reply was made to PR kern/49691; it has been noted by GNATS.
From: Mihai Chelaru <chelaru%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/49691: KASSERT(l->l_md.md_gc_ptp == NULL) failed on
NetBSD/amd64 7.0_BETA
Date: Sun, 7 Aug 2016 20:50:03 +0100
The below patch fixes this issue, but I'd like someone with more
knowledge than me in this area to review it before anything else.
Index: sys/arch/x86/x86/vm_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/vm_machdep.c,v
retrieving revision 1.25
diff -d -u -p -r1.25 vm_machdep.c
--- sys/arch/x86/x86/vm_machdep.c 11 Mar 2014 20:55:19 -0000 1.25
+++ sys/arch/x86/x86/vm_machdep.c 7 Aug 2016 19:04:49 -0000
@@ -249,6 +249,20 @@ cpu_lwp_free(struct lwp *l, int proc)
if (proc && l->l_proc->p_md.md_flags & MDP_USEDMTRR)
mtrr_clean(l->l_proc);
#endif
+ /*
+ * Free the deferred mappings
+ */
+ if (l->l_md.md_gc_ptp != NULL) {
+ struct vm_page *ptp;
+ struct pmap_page *pp;
+
+ while ((ptp = l->l_md.md_gc_ptp) != NULL) {
+ pp = &ptp->mdpage.mp_pp;
+ l->l_md.md_gc_ptp = pp->pp_link;
+ LIST_INIT(&pp->pp_head.pvh_list);
+ uvm_pagefree(ptp);
+ }
+ }
}
/*
Home |
Main Index |
Thread Index |
Old Index