[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 17/19] libxl: suspend: Fix suspend wait corner cases



Ian Campbell writes ("Re: [PATCH 17/19] libxl: suspend: Fix suspend wait corner 
cases"):
> On Tue, 2014-03-04 at 14:56 +0000, Ian Jackson wrote:
> > +    if (ret < 0) {
> > +        LOGE(ERROR, "unable to check for status of guest %"PRId32"", 
> > domid);
> > +        goto err;
> > +        domain_suspend_common_failed(egc, dss);
> 
> You don't want this here.

Indeed I don't.

> > +    if (!(ret == 1 && info.domain == domid)) {
> > +        LOGE(ERROR, "guest %"PRId32" we were suspending has been 
> > destroyed",
> > +             domid);
> 
> Is there an (unlikely) race here where a new domain gets created with
> the same domid? Not that I have any suggestion what to do about that...

If domids are reused within the lifetime of the libxc/libxl code
managing the domain, the whole edifice is unsafe.  AFAICT this is a
fundamental problem which cannot be avoided in any toolstack
which is capable of concurrently issuing hypercalls (specifically,
destroying domains).

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.