From owner-svn-src-all@FreeBSD.ORG Thu Nov 14 21:27:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 770461A7; Thu, 14 Nov 2013 21:27:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A9412F60; Thu, 14 Nov 2013 21:27:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAELRJNX095731; Thu, 14 Nov 2013 21:27:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAELRJia095730; Thu, 14 Nov 2013 21:27:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311142127.rAELRJia095730@svn.freebsd.org> From: John Baldwin Date: Thu, 14 Nov 2013 21:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r258145 - stable/8/sys/vm X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Nov 2013 21:27:20 -0000 Author: jhb Date: Thu Nov 14 21:27:19 2013 New Revision: 258145 URL: http://svnweb.freebsd.org/changeset/base/258145 Log: MFC 255497: Fix an off-by-one error when populating mincore(2) entries for skipped entries. lastvecindex references the last valid byte, so the new bytes should come after it. Modified: stable/8/sys/vm/vm_mmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/sys/vm/vm_mmap.c ============================================================================== --- stable/8/sys/vm/vm_mmap.c Thu Nov 14 21:27:13 2013 (r258144) +++ stable/8/sys/vm/vm_mmap.c Thu Nov 14 21:27:19 2013 (r258145) @@ -878,12 +878,12 @@ RestartScan: * the byte vector is zeroed for those skipped entries. */ while ((lastvecindex + 1) < vecindex) { + ++lastvecindex; error = subyte(vec + lastvecindex, 0); if (error) { error = EFAULT; goto done2; } - ++lastvecindex; } /* @@ -919,12 +919,12 @@ RestartScan: */ vecindex = OFF_TO_IDX(end - first_addr); while ((lastvecindex + 1) < vecindex) { + ++lastvecindex; error = subyte(vec + lastvecindex, 0); if (error) { error = EFAULT; goto done2; } - ++lastvecindex; } /*