diff options
Diffstat (limited to 'kernel/rcutree_plugin.h')
-rw-r--r-- | kernel/rcutree_plugin.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index 6abef3cfcbc1..3a0ae0355222 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h | |||
@@ -342,6 +342,11 @@ static void rcu_read_unlock_special(struct task_struct *t) | |||
342 | #ifdef CONFIG_RCU_BOOST | 342 | #ifdef CONFIG_RCU_BOOST |
343 | if (&t->rcu_node_entry == rnp->boost_tasks) | 343 | if (&t->rcu_node_entry == rnp->boost_tasks) |
344 | rnp->boost_tasks = np; | 344 | rnp->boost_tasks = np; |
345 | /* Snapshot and clear ->rcu_boosted with rcu_node lock held. */ | ||
346 | if (t->rcu_boosted) { | ||
347 | special |= RCU_READ_UNLOCK_BOOSTED; | ||
348 | t->rcu_boosted = 0; | ||
349 | } | ||
345 | #endif /* #ifdef CONFIG_RCU_BOOST */ | 350 | #endif /* #ifdef CONFIG_RCU_BOOST */ |
346 | t->rcu_blocked_node = NULL; | 351 | t->rcu_blocked_node = NULL; |
347 | 352 | ||
@@ -358,7 +363,6 @@ static void rcu_read_unlock_special(struct task_struct *t) | |||
358 | #ifdef CONFIG_RCU_BOOST | 363 | #ifdef CONFIG_RCU_BOOST |
359 | /* Unboost if we were boosted. */ | 364 | /* Unboost if we were boosted. */ |
360 | if (special & RCU_READ_UNLOCK_BOOSTED) { | 365 | if (special & RCU_READ_UNLOCK_BOOSTED) { |
361 | t->rcu_read_unlock_special &= ~RCU_READ_UNLOCK_BOOSTED; | ||
362 | rt_mutex_unlock(t->rcu_boost_mutex); | 366 | rt_mutex_unlock(t->rcu_boost_mutex); |
363 | t->rcu_boost_mutex = NULL; | 367 | t->rcu_boost_mutex = NULL; |
364 | } | 368 | } |
@@ -1176,7 +1180,7 @@ static int rcu_boost(struct rcu_node *rnp) | |||
1176 | t = container_of(tb, struct task_struct, rcu_node_entry); | 1180 | t = container_of(tb, struct task_struct, rcu_node_entry); |
1177 | rt_mutex_init_proxy_locked(&mtx, t); | 1181 | rt_mutex_init_proxy_locked(&mtx, t); |
1178 | t->rcu_boost_mutex = &mtx; | 1182 | t->rcu_boost_mutex = &mtx; |
1179 | t->rcu_read_unlock_special |= RCU_READ_UNLOCK_BOOSTED; | 1183 | t->rcu_boosted = 1; |
1180 | raw_spin_unlock_irqrestore(&rnp->lock, flags); | 1184 | raw_spin_unlock_irqrestore(&rnp->lock, flags); |
1181 | rt_mutex_lock(&mtx); /* Side effect: boosts task t's priority. */ | 1185 | rt_mutex_lock(&mtx); /* Side effect: boosts task t's priority. */ |
1182 | rt_mutex_unlock(&mtx); /* Keep lockdep happy. */ | 1186 | rt_mutex_unlock(&mtx); /* Keep lockdep happy. */ |