From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCHv6 2/5] gnttab: introduce per-active entry locks Date: Thu, 23 Apr 2015 14:49:27 +0100 Message-ID: <5538F867.7010707@citrix.com> References: <1429718436-9782-1-git-send-email-david.vrabel@citrix.com> <1429718436-9782-3-git-send-email-david.vrabel@citrix.com> <553904DC020000780007521E@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YlHWc-00072p-4j for xen-devel@lists.xenproject.org; Thu, 23 Apr 2015 13:50:42 +0000 In-Reply-To: <553904DC020000780007521E@mail.emea.novell.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: Jan Beulich Cc: Keir Fraser , Ian Campbell , Christoph Egger , Tim Deegan , Matt Wilson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 23/04/15 13:42, Jan Beulich wrote: > >> @@ -3130,7 +3167,9 @@ grant_table_destroy( >> >> if ( t == NULL ) >> return; >> - >> + >> + spin_lock(&t->lock); >> + >> for ( i = 0; i < nr_grant_frames(t); i++ ) >> free_xenheap_page(t->shared_raw[i]); >> xfree(t->shared_raw); >> @@ -3147,6 +3186,8 @@ grant_table_destroy( >> free_xenheap_page(t->status[i]); >> xfree(t->status); >> >> + spin_unlock(&t->lock); > > Iirc I asked this before - do you really think these are needed? Because > again - if they are, that would seem to be a separate bug fix. It looks unnecessary to me. Unless Matt can explain why he added it, I'll drop it. David