Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Feb 2009 19:41:08 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r188320 - head/sys/vm
Message-ID:  <200902081941.n18Jf834032117@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Feb  8 19:41:08 2009
New Revision: 188320
URL: http://svn.freebsd.org/changeset/base/188320

Log:
  Do not leak the MAP_ENTRY_IN_TRANSITION flag when copying map entry
  on fork. Otherwise, copied entry cannot be removed in the child map.
  
  Reviewed by:	tegge
  MFC after:	2 weeks

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c	Sun Feb  8 19:37:01 2009	(r188319)
+++ head/sys/vm/vm_map.c	Sun Feb  8 19:41:08 2009	(r188320)
@@ -2738,7 +2738,8 @@ vmspace_fork(struct vmspace *vm1)
 			 */
 			new_entry = vm_map_entry_create(new_map);
 			*new_entry = *old_entry;
-			new_entry->eflags &= ~MAP_ENTRY_USER_WIRED;
+			new_entry->eflags &= ~(MAP_ENTRY_USER_WIRED |
+			    MAP_ENTRY_IN_TRANSITION);
 			new_entry->wired_count = 0;
 
 			/*
@@ -2764,7 +2765,8 @@ vmspace_fork(struct vmspace *vm1)
 			 */
 			new_entry = vm_map_entry_create(new_map);
 			*new_entry = *old_entry;
-			new_entry->eflags &= ~MAP_ENTRY_USER_WIRED;
+			new_entry->eflags &= ~(MAP_ENTRY_USER_WIRED |
+			    MAP_ENTRY_IN_TRANSITION);
 			new_entry->wired_count = 0;
 			new_entry->object.vm_object = NULL;
 			vm_map_entry_link(new_map, new_map->header.prev,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902081941.n18Jf834032117>