kern/118510: [libc] munmap(2) doesn't remove all mappings
Tijl Coosemans
tijl at ulyssis.org
Mon Dec 10 12:30:05 PST 2007
The following reply was made to PR kern/118510; it has been noted by GNATS.
From: Tijl Coosemans <tijl at ulyssis.org>
To: bug-followup at freebsd.org
Cc:
Subject: Re: kern/118510: [libc] munmap(2) doesn't remove all mappings
Date: Mon, 10 Dec 2007 21:21:32 +0100
--Boundary-00=_P/ZXHN+ohYP6nOq
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
proposed patch
--Boundary-00=_P/ZXHN+ohYP6nOq
Content-Type: text/plain;
charset="us-ascii";
name="vm_mmap.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="vm_mmap.patch"
--- sys/vm/vm_mmap.c.orig 2007-12-10 15:57:00.000000000 +0100
+++ sys/vm/vm_mmap.c 2007-12-10 20:40:42.000000000 +0100
@@ -555,13 +555,6 @@
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
--Boundary-00=_P/ZXHN+ohYP6nOq--
More information about the freebsd-bugs
mailing list