From owner-svn-src-head@FreeBSD.ORG Wed Mar 12 16:38:56 2014 Return-Path: Delivered-To: svn-src-head@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 7E477B74; Wed, 12 Mar 2014 16:38:56 +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 6B8EC1E6; Wed, 12 Mar 2014 16:38:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2CGcuXX091518; Wed, 12 Mar 2014 16:38:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2CGcu25091517; Wed, 12 Mar 2014 16:38:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201403121638.s2CGcu25091517@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 12 Mar 2014 16:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263095 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Mar 2014 16:38:56 -0000 Author: kib Date: Wed Mar 12 16:38:55 2014 New Revision: 263095 URL: http://svnweb.freebsd.org/changeset/base/263095 Log: Initialize paddr to handle the case of zero size. Reported and reviewed by: Conrad Meyer MFC after: 1 week Modified: head/sys/vm/device_pager.c Modified: head/sys/vm/device_pager.c ============================================================================== --- head/sys/vm/device_pager.c Wed Mar 12 15:30:40 2014 (r263094) +++ head/sys/vm/device_pager.c Wed Mar 12 16:38:55 2014 (r263095) @@ -414,6 +414,7 @@ old_dev_pager_ctor(void *handle, vm_ooff * XXX assumes VM_PROT_* == PROT_* */ npages = OFF_TO_IDX(size); + paddr = 0; /* Make paddr initialized for the case of size == 0. */ for (off = foff; npages--; off += PAGE_SIZE) { if (csw->d_mmap(dev, off, &paddr, (int)prot, &dummy) != 0) { dev_relthread(dev, ref);