From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 2/2] x86: fix RCU locking in PHYSDEVOP_get_free_pirq Date: Wed, 05 Sep 2012 14:53:18 +0100 Message-ID: References: <504765830200007800098E5D@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <504765830200007800098E5D@nat28.tlf.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 , xen-devel List-Id: xen-devel@lists.xenproject.org On 05/09/2012 13:45, "Jan Beulich" wrote: >>> Apart from properly pairing locks with unlocks, also reduce the lock >>> scope - no need to do the copy_{from,to}_guest()-s inside the protected >>> region. >>> >>> I actually wonder whether the RCU locks are needed here at all. >> >> If it's a path that only acts on current domain, then no. > > So for what case does rcu_lock_current_domain() then exist at all? To match an unconditional rcu_unlock_domain() on exit paths, for operations which can either be on current->domain or on a rcu_lock_domain_by_id(). -- Keir