From e93a6edc86df8d95dc61a041c3f9c9989a894f21 Mon Sep 17 00:00:00 2001 From: uebayasi Date: Sun, 31 Jan 2010 01:40:12 +0000 Subject: [PATCH] Correct previous; fix a miscalculation of offset-into-entry in MADV_SEQUENTIAL case. Pointed out by pooka@. --- sys/uvm/uvm_fault.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c index b1ce4d6cdcad..e817da98f71a 100644 --- a/sys/uvm/uvm_fault.c +++ b/sys/uvm/uvm_fault.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.131 2010/01/30 15:13:25 uebayasi Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.132 2010/01/31 01:40:12 uebayasi Exp $ */ /* * @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.131 2010/01/30 15:13:25 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.132 2010/01/31 01:40:12 uebayasi Exp $"); #include "opt_uvmhist.h" @@ -873,7 +873,7 @@ ReFault: } /* offset from entry's start to pgs' start */ - const voff_t eoff = startva - ufi.entry->start; + voff_t eoff = startva - ufi.entry->start; /* locked: maps(read) */ UVMHIST_LOG(maphist, " narrow=%d, back=%d, forw=%d, startva=0x%x", @@ -923,6 +923,7 @@ ReFault: startva += (nback << PAGE_SHIFT); npages -= nback; nback = centeridx = 0; + eoff = startva - ufi.entry->start; } /* locked: maps(read), amap(if there) */