|
@@ -342,6 +342,11 @@ static void rcu_read_unlock_special(struct task_struct *t)
|
|
|
#ifdef CONFIG_RCU_BOOST
|
|
|
if (&t->rcu_node_entry == rnp->boost_tasks)
|
|
|
rnp->boost_tasks = np;
|
|
|
+ /* Snapshot and clear ->rcu_boosted with rcu_node lock held. */
|
|
|
+ if (t->rcu_boosted) {
|
|
|
+ special |= RCU_READ_UNLOCK_BOOSTED;
|
|
|
+ t->rcu_boosted = 0;
|
|
|
+ }
|
|
|
#endif /* #ifdef CONFIG_RCU_BOOST */
|
|
|
t->rcu_blocked_node = NULL;
|
|
|
|
|
@@ -358,7 +363,6 @@ static void rcu_read_unlock_special(struct task_struct *t)
|
|
|
#ifdef CONFIG_RCU_BOOST
|
|
|
/* Unboost if we were boosted. */
|
|
|
if (special & RCU_READ_UNLOCK_BOOSTED) {
|
|
|
- t->rcu_read_unlock_special &= ~RCU_READ_UNLOCK_BOOSTED;
|
|
|
rt_mutex_unlock(t->rcu_boost_mutex);
|
|
|
t->rcu_boost_mutex = NULL;
|
|
|
}
|
|
@@ -1176,7 +1180,7 @@ static int rcu_boost(struct rcu_node *rnp)
|
|
|
t = container_of(tb, struct task_struct, rcu_node_entry);
|
|
|
rt_mutex_init_proxy_locked(&mtx, t);
|
|
|
t->rcu_boost_mutex = &mtx;
|
|
|
- t->rcu_read_unlock_special |= RCU_READ_UNLOCK_BOOSTED;
|
|
|
+ t->rcu_boosted = 1;
|
|
|
raw_spin_unlock_irqrestore(&rnp->lock, flags);
|
|
|
rt_mutex_lock(&mtx); /* Side effect: boosts task t's priority. */
|
|
|
rt_mutex_unlock(&mtx); /* Keep lockdep happy. */
|