NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: kern/53072: netbsd-8 regression: startx (nv driver) crashes system



can you try this patch?  it's x86/pmap.c 1.267 which was
missed in the pullup.

Benny, this might fix your new problem too.  can you also
test it?

thanks.


.mrg.

Index: pmap.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/pmap.c,v
retrieving revision 1.245.6.2
diff -p -u -u -r1.245.6.2 pmap.c
--- pmap.c	27 Feb 2018 09:07:33 -0000	1.245.6.2
+++ pmap.c	5 Mar 2018 19:02:45 -0000
@@ -1737,8 +1737,8 @@ pmap_pp_needs_pve(struct pmap_page *pp)
 	 * since the first pv entry is stored in the pmap_page.
 	 */
 
-	return (pp->pp_flags & PP_EMBEDDED) != 0 ||
-		!LIST_EMPTY(&pp->pp_head.pvh_list);
+	return pp && ((pp->pp_flags & PP_EMBEDDED) != 0 ||
+	    !LIST_EMPTY(&pp->pp_head.pvh_list));
 }
 
 /*
@@ -4123,7 +4123,7 @@ pmap_enter_ma(struct pmap *pmap, vaddr_t
 	 */
 
 	bool needpves = pmap_pp_needs_pve(new_pp);
-	if (new_pp && needpves) {
+	if (needpves) {
 		new_pve = pool_cache_get(&pmap_pv_cache, PR_NOWAIT);
 		new_sparepve = pool_cache_get(&pmap_pv_cache, PR_NOWAIT);
 	} else {


Home | Main Index | Thread Index | Old Index