提交 96050c68 编写于 作者: P Paul E. McKenney

rcu: Upgrade sync_exp_work_done() to smp_mb()

The sync_exp_work_done() function uses smp_mb__before_atomic(), but
there is no obvious atomic in the ensuing code.  The ordering is
absolutely required for grace periods to work correctly, so this
commit upgrades the smp_mb__before_atomic() to smp_mb().

Fixes: 6fba2b37 ("rcu: Remove deprecated RCU debugfs tracing code")
Reported-by: NAndrea Parri <andrea.parri@amarulasolutions.com>
Signed-off-by: NPaul E. McKenney <paulmck@linux.ibm.com>
上级 714b6904
...@@ -259,8 +259,7 @@ static bool sync_exp_work_done(unsigned long s) ...@@ -259,8 +259,7 @@ static bool sync_exp_work_done(unsigned long s)
{ {
if (rcu_exp_gp_seq_done(s)) { if (rcu_exp_gp_seq_done(s)) {
trace_rcu_exp_grace_period(rcu_state.name, s, TPS("done")); trace_rcu_exp_grace_period(rcu_state.name, s, TPS("done"));
/* Ensure test happens before caller kfree(). */ smp_mb(); /* Ensure test happens before caller kfree(). */
smp_mb__before_atomic(); /* ^^^ */
return true; return true;
} }
return false; return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册