From owner-svn-src-stable@FreeBSD.ORG Tue May 6 12:20:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EB0982C; Tue, 6 May 2014 12:20:08 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BD971B5; Tue, 6 May 2014 12:20:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46CK8v8080690; Tue, 6 May 2014 12:20:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46CK8bO080689; Tue, 6 May 2014 12:20:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405061220.s46CK8bO080689@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 6 May 2014 12:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265435 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 12:20:08 -0000 Author: kib Date: Tue May 6 12:20:07 2014 New Revision: 265435 URL: http://svnweb.freebsd.org/changeset/base/265435 Log: MFC r265100: Fix the comparision for the end of range in vm_phys_fictitious_reg_range(). Modified: stable/10/sys/vm/vm_phys.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_phys.c ============================================================================== --- stable/10/sys/vm/vm_phys.c Tue May 6 12:15:05 2014 (r265434) +++ stable/10/sys/vm/vm_phys.c Tue May 6 12:20:07 2014 (r265435) @@ -552,7 +552,9 @@ vm_phys_fictitious_reg_range(vm_paddr_t #ifdef VM_PHYSSEG_DENSE pi = atop(start); - if (pi >= first_page && atop(end) < vm_page_array_size) { + if (pi >= first_page && pi < vm_page_array_size + first_page) { + if (atop(end) >= vm_page_array_size + first_page) + return (EINVAL); fp = &vm_page_array[pi - first_page]; malloced = FALSE; } else