From: Ian Jackson Subject: Re: [PATCH 18/18] libxl: timeouts: Record deregistration when one occurs Date: Thu, 6 Feb 2014 14:24:52 +0000 Message-ID: <21235.39732.329017.933315@mariner.uk.xensource.com> References: <1391444091-22796-1-git-send-email-ian.jackson@eu.citrix.com> <1391444091-22796-19-git-send-email-ian.jackson@eu.citrix.com> <1391695494.25128.22.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1391695494.25128.22.camel@kazak.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 Campbell Cc: George Dunlap , Jim Fehlig , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [PATCH 18/18] libxl: timeouts: Record deregistration when one occurs"): > On Mon, 2014-02-03 at 16:14 +0000, Ian Jackson wrote: > > When a timeout has occurred, it is deregistered. However, we failed > > to record this fact by updating etime->func. As a result, > > libxl__ev_time_isregistered would say `true' for a timeout which has > > already happened. > > Acked-by: Ian Campbell > > Although if you were minded to explicitly note in the changelog that it > is necessary to nuke ->func before running the callback so that it > doesn't try and fire it again in parallel while it is running then that > would be good. That's not the reason. This is the reason, which I have just put in the commit message: It is necessary to clear etime->func before the callback, because the callback might want to reinstate the timeout, or might free the etime (or its containing struct) entirely. I have also fixed my S-o-b which incorrectly used my personal email address. Ian.