summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-11-16 02:28:33 +0000
committerpeter <peter@FreeBSD.org>2001-11-16 02:28:33 +0000
commit95eb5d80c21d6f60f31e6993d5b4315155377bc7 (patch)
treeda97b8c8b403f98280ea5525e5fe6571c22d98c8 /sys/alpha
parent56c06d9e26585bede262d085e21ed714d06df225 (diff)
downloadFreeBSD-src-95eb5d80c21d6f60f31e6993d5b4315155377bc7.zip
FreeBSD-src-95eb5d80c21d6f60f31e6993d5b4315155377bc7.tar.gz
Merge rev 1.264 from i386/pmap.c (tegge via alfred):
Protect against an infinite loop when prefaulting pages. This can happen when the vm system maps past the end of an object or tries to map a zero length object, the pmap layer misses the fact that offsets wrap into negative numbers and we get stuck.
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/pmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c
index f178566..3d523be 100644
--- a/sys/alpha/alpha/pmap.c
+++ b/sys/alpha/alpha/pmap.c
@@ -2444,8 +2444,11 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr,
return;
}
- if (psize + pindex > object->size)
+ if (psize + pindex > object->size) {
+ if (object->size < pindex)
+ return;
psize = object->size - pindex;
+ }
mpte = NULL;
/*
OpenPOWER on IntegriCloud