Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm avoid leaking a uvm_object reference when merging a ...
details: https://anonhg.NetBSD.org/src/rev/5162f6733716
branches: trunk
changeset: 781093:5162f6733716
user: chs <chs%NetBSD.org@localhost>
date: Sat Aug 18 14:28:04 2012 +0000
description:
avoid leaking a uvm_object reference when merging a new map entry
with the entries on both sides. fixes PR 46807.
diffstat:
sys/uvm/uvm_map.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r fad4cf315964 -r 5162f6733716 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Sat Aug 18 10:27:58 2012 +0000
+++ b/sys/uvm/uvm_map.c Sat Aug 18 14:28:04 2012 +0000
@@ -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 @@
/*
* 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) {
Home |
Main Index |
Thread Index |
Old Index