This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [xen-unstable] [IA64] Avoid double free of VHPT for HVM

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Avoid double free of VHPT for HVM domain
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Mar 2007 05:30:39 -0700
Delivery-date: Fri, 23 Mar 2007 05:31:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User awilliam@xxxxxxxxxxxx
# Date 1174404242 21600
# Node ID 2dbee4f1ee633a69483290fb68e9f482f4ce4214
# Parent  e1d626bde5db9be3cc6741eaa3578a44e57622c9
[IA64] Avoid double free of VHPT for HVM domain

If vTLB area is not able to allocate with shortage of domheap,
Xen does a panic for double free of VHPT.

At first:
    -> init_domain_tlb()
         -> free_domain_vhpt()

At second:
    -> vcpu_destroy()
         -> vmx_relinquish_vcpu_resources()
              -> free_domain_tlb()
                   -> free_domain_vhpt()

This patch avoids double free of VHPT by clearing v->arch.vhpt.hash
in free_domain_vhpt().

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
 xen/arch/ia64/vmx/vmmu.c |    1 +
 1 files changed, 1 insertion(+)

diff -r e1d626bde5db -r 2dbee4f1ee63 xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c  Tue Mar 20 09:21:47 2007 -0600
+++ b/xen/arch/ia64/vmx/vmmu.c  Tue Mar 20 09:24:02 2007 -0600
@@ -161,6 +161,7 @@ static void free_domain_vhpt(struct vcpu
     if (v->arch.vhpt.hash) {
         page = virt_to_page(v->arch.vhpt.hash);
         free_domheap_pages(page, VCPU_VHPT_ORDER);
+        v->arch.vhpt.hash = 0;

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Avoid double free of VHPT for HVM domain, Xen patchbot-unstable <=