From owner-svn-src-stable-10@freebsd.org Fri Apr 14 14:39:59 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4A67D3D090; Fri, 14 Apr 2017 14:39:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B6671617; Fri, 14 Apr 2017 14:39:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3EEdwqB070742; Fri, 14 Apr 2017 14:39:58 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EEdwdK070741; Fri, 14 Apr 2017 14:39:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201704141439.v3EEdwdK070741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 14 Apr 2017 14:39:58 +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: r316838 - 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-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 14:40:00 -0000 Author: avg Date: Fri Apr 14 14:39:58 2017 New Revision: 316838 URL: https://svnweb.freebsd.org/changeset/base/316838 Log: MFC r286583: Avoid sign extension of value passed to kva_alloc from uma_zone_reserve_kva On behalf of: zbb Modified: stable/10/sys/vm/uma_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/uma_core.c ============================================================================== --- stable/10/sys/vm/uma_core.c Fri Apr 14 14:38:27 2017 (r316837) +++ stable/10/sys/vm/uma_core.c Fri Apr 14 14:39:58 2017 (r316838) @@ -3109,7 +3109,7 @@ uma_zone_reserve_kva(uma_zone_t zone, in { uma_keg_t keg; vm_offset_t kva; - int pages; + u_int pages; keg = zone_first_keg(zone); if (keg == NULL) @@ -3124,7 +3124,7 @@ uma_zone_reserve_kva(uma_zone_t zone, in #else if (1) { #endif - kva = kva_alloc(pages * UMA_SLAB_SIZE); + kva = kva_alloc((vm_size_t)pages * UMA_SLAB_SIZE); if (kva == 0) return (0); } else