Date: Mon, 4 Feb 2013 08:53:51 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246313 - user/attilio/vmc-playground/sys/vm Message-ID: <201302040853.r148rpRa060874@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302040853.r148rpRa060874>