svn commit: r356150 - head/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Sat Dec 28 16:40:44 UTC 2019
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(),
More information about the svn-src-all
mailing list