remove redundant rcu_read_unlock
PATCH 1/1 remove redundant rcu_read_unlock
In the function rcu_lock_domain_by_id there is a call to rcu_read_unlock just prior to returning. However, the intent is that the rcu reader retain the read lock after the call has returned. This can be verified by auditing the callers of this routine, which each explicitly call rcu_unlock_domain, which in turn calls rcu_read_unlock.
--
Remove redundant call to rcu_read_unlock.
xen/common/domain.c +0 -2
@@ -252,8 +252,6 @@ struct domain *rcu_lock_domain_by_id(domreturn d; } -rcu_read_unlock (&domlist_read_lock); -return NULL ;
}
Signature · 5 lines
Mike D. Day IBM LTC Cell: 919 412-3900 Sametime: [email protected] AIM: ncmikeday Yahoo: ultra.runner PGP key: http://www.ncultra.org/ncmike/pubkey.asc
Quoted 9 lines · Mike D. Day
In the function
rcu_lock_domain_by_idthere is a call torcu_read_unlockjust prior to returning. However, the intent is that the rcu reader retain the read lock after the call has returned. This can be verified by auditing the callers of this routine, which each explicitly callrcu_unlock_domain, which in turn callsrcu_read_unlock.--
Remove redundant call torcu_read_unlock.
It's not redundant -- that's the error path (returning NULL). Callers do not call the unlock function in this case.
-- Keir