Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b08ea27d authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

rcu: Protect rcu_boost() lockless accesses with ACCESS_ONCE()



This commit prevents random compiler optimizations by applying
ACCESS_ONCE() to lockless accesses.

Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent 734d1680
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);