lkml.org 
[lkml]   [2019]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH tip/core/rcu 6/9] rcu: Upgrade sync_exp_work_done() to smp_mb()
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?

> Reported-by: Andrea Parri <andrea.parri@amarulasolutions.com>
> Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
> ---
> kernel/rcu/tree_exp.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> 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;
> --
> 2.17.1
>

\
 
 \ /
  Last update: 2019-06-06 09:49    [W:0.111 / U:1.696 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site