From owner-svn-src-stable@FreeBSD.ORG Wed Aug 20 08:24:38 2014 Return-Path: Delivered-To: svn-src-stable@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 E3572BBE; Wed, 20 Aug 2014 08:24:38 +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 B45A93DB0; Wed, 20 Aug 2014 08:24:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K8OcAE069092; Wed, 20 Aug 2014 08:24:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K8OcSn069089; Wed, 20 Aug 2014 08:24:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408200824.s7K8OcSn069089@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Aug 2014 08:24:38 +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: r270205 - in stable/10/sys: kern 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-1 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: Wed, 20 Aug 2014 08:24:39 -0000 Author: kib Date: Wed Aug 20 08:24:37 2014 New Revision: 270205 URL: http://svnweb.freebsd.org/changeset/base/270205 Log: MFC r269907: Fix leaks of unqueued unwired pages. Modified: stable/10/sys/kern/kern_exec.c stable/10/sys/kern/uipc_shm.c stable/10/sys/vm/vm_glue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Wed Aug 20 08:15:23 2014 (r270204) +++ stable/10/sys/kern/kern_exec.c Wed Aug 20 08:24:37 2014 (r270205) @@ -996,6 +996,7 @@ exec_map_first_page(imgp) vm_page_xunbusy(ma[0]); vm_page_lock(ma[0]); vm_page_hold(ma[0]); + vm_page_activate(ma[0]); vm_page_unlock(ma[0]); VM_OBJECT_WUNLOCK(object); Modified: stable/10/sys/kern/uipc_shm.c ============================================================================== --- stable/10/sys/kern/uipc_shm.c Wed Aug 20 08:15:23 2014 (r270204) +++ stable/10/sys/kern/uipc_shm.c Wed Aug 20 08:24:37 2014 (r270205) @@ -197,6 +197,12 @@ uiomove_object_page(vm_object_t obj, siz vm_page_xunbusy(m); vm_page_lock(m); vm_page_hold(m); + if (m->queue == PQ_NONE) { + vm_page_deactivate(m); + } else { + /* Requeue to maintain LRU ordering. */ + vm_page_requeue(m); + } vm_page_unlock(m); VM_OBJECT_WUNLOCK(obj); error = uiomove_fromphys(&m, offset, tlen, uio); @@ -208,12 +214,6 @@ uiomove_object_page(vm_object_t obj, siz } vm_page_lock(m); vm_page_unhold(m); - if (m->queue == PQ_NONE) { - vm_page_deactivate(m); - } else { - /* Requeue to maintain LRU ordering. */ - vm_page_requeue(m); - } vm_page_unlock(m); return (error); Modified: stable/10/sys/vm/vm_glue.c ============================================================================== --- stable/10/sys/vm/vm_glue.c Wed Aug 20 08:15:23 2014 (r270204) +++ stable/10/sys/vm/vm_glue.c Wed Aug 20 08:24:37 2014 (r270205) @@ -251,6 +251,7 @@ vm_imgact_hold_page(vm_object_t object, vm_page_xunbusy(m); vm_page_lock(m); vm_page_hold(m); + vm_page_activate(m); vm_page_unlock(m); out: VM_OBJECT_WUNLOCK(object);