From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 2/2] libxl_internal: comment on domain userdata unlock function Date: Thu, 8 Jan 2015 17:42:23 +0000 Message-ID: <1420738943.19787.126.camel@citrix.com> References: <1420644180-7733-1-git-send-email-wei.liu2@citrix.com> <1420644180-7733-3-git-send-email-wei.liu2@citrix.com> <21677.25648.385177.453858@mariner.uk.xensource.com> <20150107165728.GO28680@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150107165728.GO28680@zion.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: Wei Liu Cc: Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2015-01-07 at 16:57 +0000, Wei Liu wrote: > > > diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c > > > index 9d8025d..a70214b 100644 > > > --- a/tools/libxl/libxl_internal.c > > > +++ b/tools/libxl/libxl_internal.c > > > @@ -458,6 +458,20 @@ out: > > > > > > void libxl__unlock_domain_userdata(libxl__domain_userdata_lock *lock) > > > { > > > + /* It's important to unlink the file before closing fd to avoid > > > + * such race (if close before unlink): > > ^^^^ > > > > "to avoid the following race". "Such" must refer to a thing which > > precedes. > > > > I suppose you (or Ian C) can fix this when committing? Do I need to > resend? I've applied both patches and fixed this up.