svn commit: r246313 - user/attilio/vmc-playground/sys/vm
Attilio Rao
attilio at FreeBSD.org
Mon Feb 4 08:53:51 UTC 2013
Author: attilio
Date: Mon Feb 4 08:53:51 2013
New Revision: 246313
URL: http://svnweb.freebsd.org/changeset/base/246313
Log:
Detect address wrapup without defining the right boundary.
Modified:
user/attilio/vmc-playground/sys/vm/vm_object.c
Modified: user/attilio/vmc-playground/sys/vm/vm_object.c
==============================================================================
--- user/attilio/vmc-playground/sys/vm/vm_object.c Mon Feb 4 06:59:33 2013 (r246312)
+++ user/attilio/vmc-playground/sys/vm/vm_object.c Mon Feb 4 08:53:51 2013 (r246313)
@@ -96,8 +96,6 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_reserv.h>
#include <vm/uma.h>
-#define VM_PINDEX_MAX ((vm_pindex_t)(-1))
-
static int old_msync;
SYSCTL_INT(_vm, OID_AUTO, old_msync, CTLFLAG_RW, &old_msync, 0,
"Use old (insecure) msync behavior");
@@ -770,9 +768,9 @@ vm_object_terminate(vm_object_t object)
vp = object->handle;
/* Point to the next available index. */
- if (p->pindex == VM_PINDEX_MAX)
- break;
start = p->pindex + 1;
+ if (start < p->pindex)
+ break;
}
vm_radix_reclaim_allnodes(&object->cache);
mtx_unlock(&vm_page_queue_free_mtx);
@@ -1800,9 +1798,9 @@ vm_object_collapse(vm_object_t object)
* Point to the next available
* index.
*/
- if (tmpindex == VM_PINDEX_MAX)
- break;
start = tmpindex + 1;
+ if (start < tmpindex)
+ break;
}
mtx_unlock(&vm_page_queue_free_mtx);
}
More information about the svn-src-user
mailing list