diff options
author | peter <peter@FreeBSD.org> | 2001-11-16 02:28:33 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-11-16 02:28:33 +0000 |
commit | 95eb5d80c21d6f60f31e6993d5b4315155377bc7 (patch) | |
tree | da97b8c8b403f98280ea5525e5fe6571c22d98c8 /sys/ia64 | |
parent | 56c06d9e26585bede262d085e21ed714d06df225 (diff) | |
download | FreeBSD-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/ia64')
-rw-r--r-- | sys/ia64/ia64/pmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 31728f9..126a75b 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -1856,8 +1856,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; + } /* * if we are processing a major portion of the object, then scan the |