From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762125AbZEFV6w (ORCPT ); Wed, 6 May 2009 17:58:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761166AbZEFVyb (ORCPT ); Wed, 6 May 2009 17:54:31 -0400 Received: from kroah.org ([198.145.64.141]:56979 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761369AbZEFVy1 (ORCPT ); Wed, 6 May 2009 17:54:27 -0400 X-Mailbox-Line: From gregkh@mini.kroah.org Wed May 6 14:47:56 2009 Message-Id: <20090506214756.716862513@mini.kroah.org> User-Agent: quilt/0.48-1 Date: Wed, 06 May 2009 14:45:39 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org, jejb@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Joerg Roedel , Avi Kivity , Chris Wright Subject: [patch 11/58] KVM: x86: release time_page on vcpu destruction References: <20090506214528.660389067@mini.kroah.org> Content-Disposition: inline; filename=kvm-x86-release-time_page-on-vcpu-destruction.patch In-Reply-To: <20090506215017.GA21981@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2.6.29-stable review patch. If anyone has any objections, please let us know. ------------------ From: Joerg Roedel upstream commit: 7f1ea208968f021943d4103ba59e06bb6d8239cb Not releasing the time_page causes a leak of that page or the compound page it is situated in. Cc: stable@kernel.org Signed-off-by: Joerg Roedel Signed-off-by: Avi Kivity Signed-off-by: Chris Wright --- arch/x86/kvm/x86.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3962,6 +3962,11 @@ EXPORT_SYMBOL_GPL(kvm_put_guest_fpu); void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) { + if (vcpu->arch.time_page) { + kvm_release_page_dirty(vcpu->arch.time_page); + vcpu->arch.time_page = NULL; + } + kvm_x86_ops->vcpu_free(vcpu); }