Deleted Added
full compact
62c62
< * $FreeBSD: head/sys/vm/vm_glue.c 103216 2002-09-11 08:13:56Z julian $
---
> * $FreeBSD: head/sys/vm/vm_glue.c 103767 2002-09-21 22:07:17Z jake $
151a152
> vm_map_t map;
156,166c157,159
< /*
< * XXX - check separately to disallow access to user area and user
< * page tables - they are in the map.
< *
< * XXX - VM_MAXUSER_ADDRESS is an end address, not a max. It was once
< * only used (as an end address) in trap.c. Use it as an end address
< * here too. This bogusness has spread. I just fixed where it was
< * used as a max in vm_mmap.c.
< */
< if ((vm_offset_t) addr + len > /* XXX */ VM_MAXUSER_ADDRESS
< || (vm_offset_t) addr + len < (vm_offset_t) addr) {
---
> map = &curproc->p_vmspace->vm_map;
> if ((vm_offset_t)addr + len > vm_map_max(map) ||
> (vm_offset_t)addr + len < (vm_offset_t)addr) {
169,171c162,163
< rv = vm_map_check_protection(&curproc->p_vmspace->vm_map,
< trunc_page((vm_offset_t)addr), round_page((vm_offset_t)addr + len),
< prot);
---
> rv = vm_map_check_protection(map, trunc_page((vm_offset_t)addr),
> round_page((vm_offset_t)addr + len), prot);