Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/arch/x86/x86 Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/a4db8893bfc1
branches:  netbsd-9
changeset: 964103:a4db8893bfc1
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Sep 02 12:40:06 2020 +0000

description:
Pull up following revision(s) (requested by bouyer in ticket #1073):

        sys/arch/x86/x86/pmap.c: revision 1.404

Fix braino in pmap_find_gnt(), really return the gnt entry covering the range
and not one that starts just after.

Fixes a KASSERT in pmap_remove_gnt().

diffstat:

 sys/arch/x86/x86/pmap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d61e69f5c964 -r a4db8893bfc1 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Wed Sep 02 12:38:07 2020 +0000
+++ b/sys/arch/x86/x86/pmap.c   Wed Sep 02 12:40:06 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.334.2.3 2020/06/07 12:54:39 martin Exp $    */
+/*     $NetBSD: pmap.c,v 1.334.2.4 2020/09/02 12:40:06 martin Exp $    */
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.334.2.3 2020/06/07 12:54:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.334.2.4 2020/09/02 12:40:06 martin Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -4408,7 +4408,7 @@
        headp = pmap->pm_data;
        KASSERT(headp != NULL);
        SLIST_FOREACH(pgnt, headp, pd_gnt_list) {
-               if (pgnt->pd_gnt_sva >= sva && pgnt->pd_gnt_sva <= eva)
+               if (pgnt->pd_gnt_sva <= sva && eva <= pgnt->pd_gnt_eva)
                        return pgnt;
                /* check that we're not overlapping part of a region */
                KASSERT(pgnt->pd_gnt_sva >= eva || pgnt->pd_gnt_eva <= sva);



Home | Main Index | Thread Index | Old Index