aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcu/tree_plugin.h')
-rw-r--r--kernel/rcu/tree_plugin.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 6abb03dff5c0..b023e5407111 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -779,8 +779,10 @@ static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp,
779 } 779 }
780 if (rnp->parent == NULL) { 780 if (rnp->parent == NULL) {
781 raw_spin_unlock_irqrestore(&rnp->lock, flags); 781 raw_spin_unlock_irqrestore(&rnp->lock, flags);
782 if (wake) 782 if (wake) {
783 smp_mb(); /* EGP done before wake_up(). */
783 wake_up(&sync_rcu_preempt_exp_wq); 784 wake_up(&sync_rcu_preempt_exp_wq);
785 }
784 break; 786 break;
785 } 787 }
786 mask = rnp->grpmask; 788 mask = rnp->grpmask;
@@ -1852,6 +1854,7 @@ static int rcu_oom_notify(struct notifier_block *self,
1852 1854
1853 /* Wait for callbacks from earlier instance to complete. */ 1855 /* Wait for callbacks from earlier instance to complete. */
1854 wait_event(oom_callback_wq, atomic_read(&oom_callback_count) == 0); 1856 wait_event(oom_callback_wq, atomic_read(&oom_callback_count) == 0);
1857 smp_mb(); /* Ensure callback reuse happens after callback invocation. */
1855 1858
1856 /* 1859 /*
1857 * Prevent premature wakeup: ensure that all increments happen 1860 * Prevent premature wakeup: ensure that all increments happen
@@ -2250,6 +2253,7 @@ static int rcu_nocb_kthread(void *arg)
2250 trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, 2253 trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu,
2251 TPS("Sleep")); 2254 TPS("Sleep"));
2252 wait_event_interruptible(rdp->nocb_wq, rdp->nocb_head); 2255 wait_event_interruptible(rdp->nocb_wq, rdp->nocb_head);
2256 /* Memory barrier provide by xchg() below. */
2253 } else if (firsttime) { 2257 } else if (firsttime) {
2254 firsttime = 0; 2258 firsttime = 0;
2255 trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, 2259 trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu,