From: Ian Jackson Subject: Re: [PATCH] fix race condition between libvirtd event handling and libxl fd deregister Date: Tue, 11 Dec 2012 11:18:29 +0000 Message-ID: <20679.5765.810785.732270@mariner.uk.xensource.com> References: <0451e6041bdd88c90eee.1353395794@linux-bjrd.bjz> <20661.3989.258191.396175@mariner.uk.xensource.com> <1354101923.25834.16.camel@zakaz.uk.xensource.com> <20674.16214.934271.479230@mariner.uk.xensource.com> <1355134766.31710.119.camel@zakaz.uk.xensource.com> <20677.47995.298291.120095@mariner.uk.xensource.com> <50C676B1.4070609@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50C676B1.4070609@suse.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: Jim Fehlig Cc: Bamvor Jian Zhang , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Jim Fehlig writes ("Re: [Xen-devel] [PATCH] fix race condition between libvirtd event handling and libxl fd deregister"): > Ian Jackson wrote: > > Yes, I think that's what Bamvor meant but I don't think it's correct > > that such a lock eliminates the race. libvirt has to release that > > lock before making the callback (to follow the libxl locking rules > > which are necessary to avoid deadlock). > > And it does. The event loop lock is released just before invoking the > callback, and re-acquired just after the callback returns. Right. So I think the race that my patches are trying to fix does exist. Ian.