[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190613223604.GE28207@linux.ibm.com>
Date: Thu, 13 Jun 2019 15:36:04 -0700
From: "Paul E. McKenney" <paulmck@...ux.ibm.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: rcu@...r.kernel.org, linux-kernel@...r.kernel.org,
mingo@...nel.org, jiangshanlai@...il.com, dipankar@...ibm.com,
akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
josh@...htriplett.org, tglx@...utronix.de, rostedt@...dmis.org,
dhowells@...hat.com, edumazet@...gle.com, fweisbec@...il.com,
oleg@...hat.com, joel@...lfernandes.org
Subject: Re: [PATCH tip/core/rcu 6/9] rcu: Upgrade sync_exp_work_done() to
smp_mb()
On Thu, Jun 06, 2019 at 09:48:49AM +0200, Peter Zijlstra wrote:
> On Thu, May 30, 2019 at 08:00:12AM -0700, Paul E. McKenney wrote:
> > 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().
> >
>
> Did this commit want a Fixes: line? Such that robots can find the right
> kernels to backport this to?
Indeed it does, and thanks to Andrea for finding the commit.
Thanx, Paul
------------------------------------------------------------------------
commit 96050c68be33edef18800ad6748f61f81db81a20
Author: Paul E. McKenney <paulmck@...ux.ibm.com>
Date: Sat Apr 20 01:40:54 2019 -0700
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: 6fba2b3767ea ("rcu: Remove deprecated RCU debugfs tracing code")
Reported-by: Andrea Parri <andrea.parri@...rulasolutions.com>
Signed-off-by: Paul E. McKenney <paulmck@...ux.ibm.com>
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
index 9c990df880d1..d969650a72c6 100644
--- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h
@@ -259,8 +259,7 @@ static bool sync_exp_work_done(unsigned long s)
{
if (rcu_exp_gp_seq_done(s)) {
trace_rcu_exp_grace_period(rcu_state.name, s, TPS("done"));
- /* Ensure test happens before caller kfree(). */
- smp_mb__before_atomic(); /* ^^^ */
+ smp_mb(); /* Ensure test happens before caller kfree(). */
return true;
}
return false;
Powered by blists - more mailing lists