Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm amap_copy: fix one more regression, thanks to enami@.
details: https://anonhg.NetBSD.org/src/rev/4f36ec4a55cc
branches: trunk
changeset: 766499:4f36ec4a55cc
user: rmind <rmind%NetBSD.org@localhost>
date: Fri Jun 24 01:48:43 2011 +0000
description:
amap_copy: fix one more regression, thanks to enami@.
diffstat:
sys/uvm/uvm_amap.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 654529b9621b -r 4f36ec4a55cc sys/uvm/uvm_amap.c
--- a/sys/uvm/uvm_amap.c Fri Jun 24 01:39:41 2011 +0000
+++ b/sys/uvm/uvm_amap.c Fri Jun 24 01:48:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_amap.c,v 1.98 2011/06/24 01:39:22 rmind Exp $ */
+/* $NetBSD: uvm_amap.c,v 1.99 2011/06/24 01:48:43 rmind Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.98 2011/06/24 01:39:22 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.99 2011/06/24 01:48:43 rmind Exp $");
#include "opt_uvmhist.h"
@@ -818,7 +818,11 @@
UVMHIST_LOG(maphist, "<- done [creating new amap 0x%x->0x%x]",
entry->start, entry->end, 0, 0);
- /* Allocate an initialised amap and install it. */
+ /*
+ * Allocate an initialised amap and install it.
+ * Note: we must update the length after clipping.
+ */
+ len = entry->end - entry->start;
entry->aref.ar_pageoff = 0;
entry->aref.ar_amap = amap_alloc(len, 0, waitf);
if (entry->aref.ar_amap != NULL) {
Home |
Main Index |
Thread Index |
Old Index