From owner-svn-src-head@FreeBSD.ORG Mon Sep 23 20:14:16 2013 Return-Path: Delivered-To: svn-src-head@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 ESMTP id 92CFD80E; Mon, 23 Sep 2013 20:14:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) 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 7FE3C2666; Mon, 23 Sep 2013 20:14:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8NKEGrx038806; Mon, 23 Sep 2013 20:14:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NKEGto038804; Mon, 23 Sep 2013 20:14:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309232014.r8NKEGto038804@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 23 Sep 2013 20:14:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255827 - in head/sys: amd64/amd64 i386/i386 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.14 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: Mon, 23 Sep 2013 20:14:16 -0000 Author: kib Date: Mon Sep 23 20:14:15 2013 New Revision: 255827 URL: http://svnweb.freebsd.org/changeset/base/255827 Log: Free both KVA and backing pages when freeing TSS memory. Reported and tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (marius) Modified: head/sys/amd64/amd64/vm_machdep.c head/sys/i386/i386/vm_machdep.c Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Mon Sep 23 20:06:59 2013 (r255826) +++ head/sys/amd64/amd64/vm_machdep.c Mon Sep 23 20:14:15 2013 (r255827) @@ -341,7 +341,7 @@ cpu_thread_clean(struct thread *td) * Clean TSS/iomap */ if (pcb->pcb_tssp != NULL) { - kva_free((vm_offset_t)pcb->pcb_tssp, + kmem_free(kernel_arena, (vm_offset_t)pcb->pcb_tssp, ctob(IOPAGES + 1)); pcb->pcb_tssp = NULL; } Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Mon Sep 23 20:06:59 2013 (r255826) +++ head/sys/i386/i386/vm_machdep.c Mon Sep 23 20:14:15 2013 (r255827) @@ -367,7 +367,7 @@ cpu_thread_clean(struct thread *td) * XXX do we need to move the TSS off the allocated pages * before freeing them? (not done here) */ - kva_free((vm_offset_t)pcb->pcb_ext, + kmem_free(kernel_arena, (vm_offset_t)pcb->pcb_ext, ctob(IOPAGES + 1)); pcb->pcb_ext = NULL; }