From: Ian Campbell Subject: Re: [PATCH 1/2] libxl: fix race in libxl__devices_destroy Date: Tue, 31 Jul 2012 14:26:58 +0100 Message-ID: <1343741218.25782.15.camel@zakaz.uk.xensource.com> References: <1343329975-33432-1-git-send-email-roger.pau@citrix.com> <1343329975-33432-2-git-send-email-roger.pau@citrix.com> <20498.39764.77835.293945@mariner.uk.xensource.com> <20498.56653.312571.205788@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20498.56653.312571.205788@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: "xen-devel@lists.xen.org" , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org On Fri, 2012-07-27 at 19:26 +0100, Ian Jackson wrote: > +void libxl__multidev_prepared(libxl__egc *egc, libxl__ao_devices *aodevs, > + int rc) > +{ > + multidev_one_callback(egc, aodevs->preparation); Don't we need to propagate rc here? Perhaps with aodevs->preparation->rc= rc ? > diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h > index f0c94e8..7072b09 100644 > --- a/tools/libxl/libxl_internal.h > +++ b/tools/libxl/libxl_internal.h > @@ -1810,20 +1810,6 @@ typedef void libxl__device_callback(libxl__egc*, libxl__ao_device*); [...] > +/* > + * Multiple devices "multidevs" handling. > + * > + * Firstly, you should > + * libxl__multidev_begin > + * multidevs->callback = ... > + * Then zero or more times > + * libxl__multidev_prepare > + * libal__initiate_device_{remove/addition}. > + * Finally, once > + * libxl__multidev_prepared > + * which will result (perhaps reentrantly) in one call to callback(). Briefly mention the multidev vs ao_devices naming? Or just do the rename now in a new patch. Ian.