From c6d84b4d4ba6eed9924d786c545da27b4e8ebb8f Mon Sep 17 00:00:00 2001 From: "Andrew R. Reiter" Date: Thu, 27 Jun 2002 06:34:03 +0000 Subject: [PATCH] Fix for the problem stated below by Tor Egge: (from: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=832566+0+ \ current/freebsd-current) "Too many pages were prefaulted in pmap_object_init_pt, thus the wrong physical page was entered in the pmap for the virtual address where the .dynamic section was supposed to be." Submitted by: tegge Approved by: tegge's patches never fail --- sys/amd64/amd64/pmap.c | 2 +- sys/i386/i386/pmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 9f380d6d2fc..e2cebaf79f3 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2493,7 +2493,7 @@ retry: ((objpgs > 0) && (p != NULL)); p = TAILQ_NEXT(p, listq)) { - if (p->pindex < pindex || p->pindex - pindex > psize) { + if (p->pindex < pindex || p->pindex - pindex >= psize) { continue; } tmpidx = p->pindex - pindex; diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 9f380d6d2fc..e2cebaf79f3 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -2493,7 +2493,7 @@ retry: ((objpgs > 0) && (p != NULL)); p = TAILQ_NEXT(p, listq)) { - if (p->pindex < pindex || p->pindex - pindex > psize) { + if (p->pindex < pindex || p->pindex - pindex >= psize) { continue; } tmpidx = p->pindex - pindex;