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] Re: [PATCH] libxenlight: clone context to avoid GC corruptio

To: Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] libxenlight: clone context to avoid GC corruption
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Thu, 3 Dec 2009 12:20:03 +0000
Cc: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Vincent Hanquez <Vincent.Hanquez@xxxxxxxxxxxxx>
Delivery-date: Thu, 03 Dec 2009 04:17:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.0912031215120.26414@kaball-desktop>
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>
References: <4B16E586.7060505@xxxxxxxxxxxxxxxx> <alpine.DEB.2.00.0912031215120.26414@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Thu, 3 Dec 2009, Stefano Stabellini wrote:
> On Wed, 2 Dec 2009, Andres Lagar-Cavilla wrote:
> > Provide a function to clone a context. This is necessary
> > because simply copying the structs will eventually
> > corrup the GC: maxsize is updated in the cloned context
> > but not in the originating one, yet they have the same
> > array of referenced pointers alloc_ptrs.
> > 
> > Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
> > 
> > 
> 
> Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> 

Actually I missed one thing: I think you should move

clone.xsh = xs_daemon_open();

into libxl_clone_context and

xs_daemon_close(clone.xsh);

into libxl_discard_cloned_context.

The rest is fine, thanks for finding and fixing this bug!

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