Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/uebayasi-xip]: src/sys/uvm FIx an off-by-one in my new code.
details: https://anonhg.NetBSD.org/src/rev/08ed0c36b698
branches: uebayasi-xip
changeset: 751700:08ed0c36b698
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Thu Apr 29 02:35:14 2010 +0000
description:
FIx an off-by-one in my new code.
diffstat:
sys/uvm/uvm_page.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 70d368755e45 -r 08ed0c36b698 sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c Wed Apr 28 21:15:48 2010 +0000
+++ b/sys/uvm/uvm_page.c Thu Apr 29 02:35:14 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.153.2.29 2010/04/28 13:28:43 uebayasi Exp $ */
+/* $NetBSD: uvm_page.c,v 1.153.2.30 2010/04/29 02:35:14 uebayasi Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.153.2.29 2010/04/28 13:28:43 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.153.2.30 2010/04/29 02:35:14 uebayasi Exp $");
#include "opt_ddb.h"
#include "opt_uvmhist.h"
@@ -961,10 +961,11 @@
if (segp == segs + VM_PHYSSEG_MAX)
panic("unknown segment: %p", seg);
SIMPLEQ_INSERT_TAIL(freelist, seg, list);
- while (segp < segs + VM_PHYSSEG_MAX) {
+ while (segp + 1 < segs + VM_PHYSSEG_MAX) {
*segp = *(segp + 1);
segp++;
}
+ *(segp + VM_PHYSSEG_MAX - 1) = NULL;
}
/*
Home |
Main Index |
Thread Index |
Old Index