From owner-svn-src-stable-9@FreeBSD.ORG Tue May 6 12:35:20 2014 Return-Path: Delivered-To: svn-src-stable-9@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 138AAFF4; Tue, 6 May 2014 12:35:20 +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 0077C606; Tue, 6 May 2014 12:35:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46CZJJX089187; Tue, 6 May 2014 12:35:19 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46CZJ9a089186; Tue, 6 May 2014 12:35:19 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201405061235.s46CZJ9a089186@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 6 May 2014 12:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265438 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 12:35:20 -0000 Author: kib Date: Tue May 6 12:35:19 2014 New Revision: 265438 URL: http://svnweb.freebsd.org/changeset/base/265438 Log: MFC r265100: Fix the comparision for the end of range in vm_phys_fictitious_reg_range(). Modified: stable/9/sys/vm/vm_phys.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_phys.c ============================================================================== --- stable/9/sys/vm/vm_phys.c Tue May 6 12:31:25 2014 (r265437) +++ stable/9/sys/vm/vm_phys.c Tue May 6 12:35:19 2014 (r265438) @@ -600,7 +600,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