Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/uvm Pull up revision 1.65 (via patch, requested by ...
details: https://anonhg.NetBSD.org/src/rev/bdb6abf85640
branches: netbsd-1-5
changeset: 491900:bdb6abf85640
user: he <he%NetBSD.org@localhost>
date: Sat Jun 16 19:35:09 2001 +0000
description:
Pull up revision 1.65 (via patch, requested by chuck):
Work around overflow problem in uvm_fault_wire().
diffstat:
sys/uvm/uvm_fault.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r e8e81805d8b5 -r bdb6abf85640 sys/uvm/uvm_fault.c
--- a/sys/uvm/uvm_fault.c Sat Jun 16 19:19:37 2001 +0000
+++ b/sys/uvm/uvm_fault.c Sat Jun 16 19:35:09 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_fault.c,v 1.48.4.1 2000/08/06 17:12:09 thorpej Exp $ */
+/* $NetBSD: uvm_fault.c,v 1.48.4.2 2001/06/16 19:35:09 he Exp $ */
/*
*
@@ -1828,17 +1828,22 @@
vm_prot_t access_type;
{
vaddr_t va;
- pmap_t pmap;
int rv;
- pmap = vm_map_pmap(map);
-
/*
* now fault it in a page at a time. if the fault fails then we have
* to undo what we have done. note that in uvm_fault VM_PROT_NONE
* is replaced with the max protection if fault_type is VM_FAULT_WIRE.
*/
+ /*
+ * XXX work around overflowing a vaddr_t. this prevents us from
+ * wiring the last page in the address space, though.
+ */
+ if (start > end) {
+ return EFAULT;
+ }
+
for (va = start ; va < end ; va += PAGE_SIZE) {
rv = uvm_fault(map, va, VM_FAULT_WIRE, access_type);
if (rv) {
@@ -1848,7 +1853,6 @@
return (rv);
}
}
-
return (KERN_SUCCESS);
}
Home |
Main Index |
Thread Index |
Old Index