From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 10 20:30:05 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2D8716A469 for ; Mon, 10 Dec 2007 20:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DFF0E13C46A for ; Mon, 10 Dec 2007 20:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id lBAKU4As055508 for ; Mon, 10 Dec 2007 20:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lBAKU4oo055505; Mon, 10 Dec 2007 20:30:04 GMT (envelope-from gnats) Date: Mon, 10 Dec 2007 20:30:04 GMT Message-Id: <200712102030.lBAKU4oo055505@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Tijl Coosemans Cc: Subject: Re: kern/118510: [libc] munmap(2) doesn't remove all mappings X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Tijl Coosemans List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2007 20:30:05 -0000 The following reply was made to PR kern/118510; it has been noted by GNATS. From: Tijl Coosemans To: bug-followup@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--