From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCHv2 4/5] evtchn: remove the locking when unmasking an event channel Date: Tue, 16 Jun 2015 10:19:58 +0100 Message-ID: <5580065E02000078000855B7@mail.emea.novell.com> References: <1434383299-21833-1-git-send-email-david.vrabel@citrix.com> <1434383299-21833-5-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z4n2J-0007OO-4A for xen-devel@lists.xenproject.org; Tue, 16 Jun 2015 09:20:03 +0000 In-Reply-To: <1434383299-21833-5-git-send-email-david.vrabel@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: xen-devel@lists.xenproject.org, Keir Fraser , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 15.06.15 at 17:48, wrote: > --- a/xen/common/event_channel.c > +++ b/xen/common/event_channel.c > @@ -977,9 +977,7 @@ int evtchn_unmask(unsigned int port) > struct domain *d = current->domain; > struct evtchn *evtchn; > > - ASSERT(spin_is_locked(&d->event_lock)); > - > - if ( unlikely(!port_is_valid(d, port)) ) > + if ( port >= read_atomic(&d->valid_evtchns) ) > return -EINVAL; Again this partial open coding looks wrong to me. Jan