Date: Thu, 14 Nov 2013 21:27:13 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258144 - stable/9/sys/vm Message-ID: <201311142127.rAELRDhp095683@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu Nov 14 21:27:13 2013 New Revision: 258144 URL: http://svnweb.freebsd.org/changeset/base/258144 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/9/sys/vm/vm_mmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Thu Nov 14 20:21:05 2013 (r258143) +++ stable/9/sys/vm/vm_mmap.c Thu Nov 14 21:27:13 2013 (r258144) @@ -963,12 +963,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; } /* @@ -1004,12 +1004,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; } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311142127.rAELRDhp095683>