WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] libxc: reset completed flag in restore_ctx

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxc: reset completed flag in restore_ctx
From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date: Mon, 23 May 2011 17:05:54 -0600
Delivery-date: Mon, 23 May 2011 16:07:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jim Fehlig <jfehlig@xxxxxxxxxx>
# Date 1306191873 21600
# Node ID f94242f20cdaee81d28f68df38d5a98f8fd9947d
# Parent  fb517cc27adef3a7ad548e7397e02e1414132ead
libxc: reset completed flag in restore_ctx

Long running libxl/libxc apps such as libvirt segfault when
attempting multiple restores.  The completed flag in restore_ctx
structure is set at completion of first restore.  Subsequent
restores do not load any pages and result in the segfault.

Reset completed flag at start of restore.

    Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>

diff -r fb517cc27ade -r f94242f20cda tools/libxc/xc_domain_restore.c
--- a/tools/libxc/xc_domain_restore.c   Fri May 20 18:20:09 2011 +0100
+++ b/tools/libxc/xc_domain_restore.c   Mon May 23 17:04:33 2011 -0600
@@ -1146,6 +1146,7 @@ int xc_domain_restore(xc_interface *xch,
 
     /* For info only */
     ctx->nr_pfns = 0;
+    ctx->completed = 0;
 
     if ( superpages )
         return 1;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel