Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm uvm_fault: fix integer overflow so that MADV_SEQUENTIAL
details: https://anonhg.NetBSD.org/src/rev/9d20db918292
branches: trunk
changeset: 573756:9d20db918292
user: yamt <yamt%NetBSD.org@localhost>
date: Mon Feb 07 11:57:38 2005 +0000
description:
uvm_fault: fix integer overflow so that MADV_SEQUENTIAL
can work on large files.
diffstat:
sys/uvm/uvm_fault.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r 5b3ddb068d1f -r 9d20db918292 sys/uvm/uvm_fault.c
--- a/sys/uvm/uvm_fault.c Mon Feb 07 08:54:42 2005 +0000
+++ b/sys/uvm/uvm_fault.c Mon Feb 07 11:57:38 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_fault.c,v 1.89 2005/01/01 09:14:49 yamt Exp $ */
+/* $NetBSD: uvm_fault.c,v 1.90 2005/02/07 11:57:38 yamt Exp $ */
/*
*
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.89 2005/01/01 09:14:49 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.90 2005/02/07 11:57:38 yamt Exp $");
#include "opt_uvmhist.h"
@@ -561,7 +561,7 @@
vm_prot_t enter_prot, check_prot;
boolean_t wired, narrow, promote, locked, shadowed, wire_fault, cow_now;
int npages, nback, nforw, centeridx, error, lcv, gotpages;
- vaddr_t startva, objaddr, currva;
+ vaddr_t startva, currva;
voff_t uoff;
struct vm_amap *amap;
struct uvm_object *uobj;
@@ -767,10 +767,9 @@
/* flush object? */
if (uobj) {
- objaddr =
- (startva - ufi.entry->start) + ufi.entry->offset;
+ uoff = (startva - ufi.entry->start) + ufi.entry->offset;
simple_lock(&uobj->vmobjlock);
- (void) (uobj->pgops->pgo_put)(uobj, objaddr, objaddr +
+ (void) (uobj->pgops->pgo_put)(uobj, uoff, uoff +
(nback << PAGE_SHIFT), PGO_DEACTIVATE);
}
Home |
Main Index |
Thread Index |
Old Index