Author: kib
Date: Sun Feb 22 10:28:09 2009
New Revision: 188913
URL: http://svn.freebsd.org/changeset/base/188913

Log:
  MFC r188320:
  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.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/vm/vm_map.c

Modified: stable/7/sys/vm/vm_map.c
==============================================================================
--- stable/7/sys/vm/vm_map.c    Sun Feb 22 10:26:02 2009        (r188912)
+++ stable/7/sys/vm/vm_map.c    Sun Feb 22 10:28:09 2009        (r188913)
@@ -2648,7 +2648,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;
 
                        /*
@@ -2674,7 +2675,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,
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to