projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
734d168
)
rcu: Protect rcu_boost() lockless accesses with ACCESS_ONCE()
author
Paul E. McKenney
<paulmck@linux.vnet.ibm.com>
Wed, 29 Oct 2014 22:39:39 +0000
(15:39 -0700)
committer
Paul E. McKenney
<paulmck@linux.vnet.ibm.com>
Tue, 6 Jan 2015 19:02:39 +0000
(11:02 -0800)
This commit prevents random compiler optimizations by applying
ACCESS_ONCE() to lockless accesses.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree_plugin.h
patch
|
blob
|
history
diff --git
a/kernel/rcu/tree_plugin.h
b/kernel/rcu/tree_plugin.h
index 3ec85cb5d544b8588fd574a80e19bd564079533f..d59913ef8360073d670068dc7ebce9061a4f4cf8 100644
(file)
--- a/
kernel/rcu/tree_plugin.h
+++ b/
kernel/rcu/tree_plugin.h
@@
-1127,7
+1127,8
@@
static int rcu_boost(struct rcu_node *rnp)
struct task_struct *t;
struct list_head *tb;
- if (rnp->exp_tasks == NULL && rnp->boost_tasks == NULL)
+ if (ACCESS_ONCE(rnp->exp_tasks) == NULL &&
+ ACCESS_ONCE(rnp->boost_tasks) == NULL)
return 0; /* Nothing left to boost. */
raw_spin_lock_irqsave(&rnp->lock, flags);