From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2 16/18] libxl: introduce libxl_userdata_unlink Date: Wed, 27 Aug 2014 03:16:59 +0100 Message-ID: <1409105819.28009.82.camel@citrix.com> References: <1406744639-28782-1-git-send-email-wei.liu2@citrix.com> <1406744639-28782-17-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1406744639-28782-17-git-send-email-wei.liu2@citrix.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@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2014-07-30 at 19:23 +0100, Wei Liu wrote: > + CTX_LOCK; > + lock = libxl__lock_domain_data(gc, domid); > + if (!lock) { This seems like a quirk which deserves commenting on since this lock only protects a specific type of userdata, specifically the libxl-json userdata. Any app defined data is not actually protected by this lock in general. I haven't yet seen the caller but it seems odd that the application would be allowed to unlink the libxl-json file, so I'm not sure why this function needs to worry about the lock (instead of insisting that the libxl-internal caller deals with it) Ian.