Module Name: src Committed By: chs Date: Sat Aug 18 14:28:05 UTC 2012
Modified Files: src/sys/uvm: uvm_map.c Log Message: avoid leaking a uvm_object reference when merging a new map entry with the entries on both sides. fixes PR 46807. To generate a diff of this commit: cvs rdiff -u -r1.318 -r1.319 src/sys/uvm/uvm_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.318 src/sys/uvm/uvm_map.c:1.319 --- src/sys/uvm/uvm_map.c:1.318 Mon Jul 30 23:56:48 2012 +++ src/sys/uvm/uvm_map.c Sat Aug 18 14:28:04 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.318 2012/07/30 23:56:48 matt Exp $ */ +/* $NetBSD: uvm_map.c,v 1.319 2012/08/18 14:28:04 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.318 2012/07/30 23:56:48 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.319 2012/08/18 14:28:04 chs Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -1445,9 +1445,8 @@ forwardmerge: /* * drop our reference to uobj since we are extending a reference * that we already have (the ref count can not drop to zero). - * (if merged, we've already detached) */ - if (uobj && uobj->pgops->pgo_detach && !merged) + if (uobj && uobj->pgops->pgo_detach) uobj->pgops->pgo_detach(uobj); if (merged) {