Author: kib
Date: Sat Dec 28 16:40:44 2019
New Revision: 356150
URL: https://svnweb.freebsd.org/changeset/base/356150

Log:
  vm_object_shadow(): fix object reference leak.
  
  In r355270 by me, vm_object_shadow() was changed to handle the
  reference counting for the shared case, but the extra reference that
  was done in vmspace_fork() for the shared/need_copy case was not
  removed.
  
  Submitted by: jeff

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c        Sat Dec 28 15:30:50 2019        (r356149)
+++ head/sys/vm/vm_map.c        Sat Dec 28 16:40:44 2019        (r356150)
@@ -4127,8 +4127,6 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c
                                    true);
                                old_entry->eflags &= ~MAP_ENTRY_NEEDS_COPY;
                                old_entry->cred = NULL;
-                               vm_object_reference(
-                                   old_entry->object.vm_object);
 
                                /*
                                 * As in vm_map_merged_neighbor_dispose(),
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to