From owner-svn-src-user@FreeBSD.ORG Mon Feb 4 08:53:51 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C1EB44E5; Mon, 4 Feb 2013 08:53:51 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9E69233D; Mon, 4 Feb 2013 08:53:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r148rplX060875; Mon, 4 Feb 2013 08:53:51 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r148rpRa060874; Mon, 4 Feb 2013 08:53:51 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201302040853.r148rpRa060874@svn.freebsd.org> From: Attilio Rao Date: Mon, 4 Feb 2013 08:53:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246313 - user/attilio/vmc-playground/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2013 08:53:51 -0000 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 #include -#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); }