correct rcu_unlock_domain()
authorJan Beulich <jbeulich@suse.com>
Fri, 21 Apr 2017 10:10:51 +0000 (12:10 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 21 Apr 2017 10:10:51 +0000 (12:10 +0200)
Match rcu_lock_domain(), and remove the slightly misleading comment:
This isn't just the companion to rcu_lock_domain_by_id() (and that
latter function indeed also keeps the domain locked, not the domain
list).

No functional change, as rcu_read_{,un}lock() ignore their arguments
anyway.

Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
xen/include/xen/sched.h

index 325733a4b84dcc70b880cd1a912c28c84d105d79..1127ca99bd307c62b2809f164dde186c504ba8fd 100644 (file)
@@ -581,11 +581,10 @@ int rcu_lock_remote_domain_by_id(domid_t dom, struct domain **d);
  */
 int rcu_lock_live_remote_domain_by_id(domid_t dom, struct domain **d);
 
-/* Finish a RCU critical region started by rcu_lock_domain_by_id(). */
 static inline void rcu_unlock_domain(struct domain *d)
 {
     if ( d != current->domain )
-        rcu_read_unlock(&domlist_read_lock);
+        rcu_read_unlock(d);
 }
 
 static inline struct domain *rcu_lock_domain(struct domain *d)