summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2008-05-24 21:57:16 +0000
committeralc <alc@FreeBSD.org>2008-05-24 21:57:16 +0000
commit933221c70b19378787045078df471a91ad53325b (patch)
tree98d299dde5181aa695cd83bce756845b9647049f /sys/vm
parent4e4b0a667c1d038712cd26ed28bd70b2495b3061 (diff)
downloadFreeBSD-src-933221c70b19378787045078df471a91ad53325b.zip
FreeBSD-src-933221c70b19378787045078df471a91ad53325b.tar.gz
To date, our implementation of munmap(2) has required that the
entirety of the specified range be mapped. Specifically, it has returned EINVAL if the entire range is not mapped. There is not, however, any basis for this in either SuSv2 or our own man page. Moreover, neither Linux nor Solaris impose this requirement. This revision removes this requirement. Submitted by: Tijl Coosemans PR: 118510 MFC after: 6 weeks
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_mmap.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index ca86cf9..c716cad 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -573,13 +573,6 @@ munmap(td, uap)
if (addr < vm_map_min(map) || addr + size > vm_map_max(map))
return (EINVAL);
vm_map_lock(map);
- /*
- * Make sure entire range is allocated.
- */
- if (!vm_map_check_protection(map, addr, addr + size, VM_PROT_NONE)) {
- vm_map_unlock(map);
- return (EINVAL);
- }
#ifdef HWPMC_HOOKS
/*
* Inform hwpmc if the address range being unmapped contains
OpenPOWER on IntegriCloud