From 479ff2a2a0461dc56fe114d6525376c96617cf1b Mon Sep 17 00:00:00 2001 From: arr Date: Thu, 27 Jun 2002 06:34:03 +0000 Subject: 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(-) (limited to 'sys') diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 9f380d6..e2cebaf 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 9f380d6..e2cebaf 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; -- cgit v1.1