All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Paul E. McKenney" <paulmck@linux.ibm.com>
Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
	mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, tglx@linutronix.de, rostedt@goodmis.org,
	dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com,
	oleg@redhat.com, joel@joelfernandes.org
Subject: Re: [PATCH tip/core/rcu 6/9] rcu: Upgrade sync_exp_work_done() to smp_mb()
Date: Thu, 6 Jun 2019 09:48:49 +0200	[thread overview]
Message-ID: <20190606074849.GD3402@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20190530150015.30995-6-paulmck@linux.ibm.com>

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
> 

  reply	other threads:[~2019-06-06  7:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-30 14:59 [PATCH tip/core/rcu 0/9] Miscellaneous fixes for v5.3 Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 1/9] rcu: Dump specified number of blocked tasks Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 2/9] rcu: Correctly unlock root node in rcu_check_gp_start_stall() Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 3/9] rcu: Make kfree_rcu() ignore NULL pointers Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 4/9] rcu: Set a maximum limit for back-to-back callback invocation Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 5/9] doc: Remove ".vnet" from paulmck email addresses Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 6/9] rcu: Upgrade sync_exp_work_done() to smp_mb() Paul E. McKenney
2019-06-06  7:48   ` Peter Zijlstra [this message]
2019-06-13 22:36     ` Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 7/9] rcu: Fix irritating whitespace error in rcu_assign_pointer() Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 8/9] rcu: Force inlining of rcu_read_lock() Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 9/9] rcu: Don't return a value from rcu_assign_pointer() Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190606074849.GD3402@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=paulmck@linux.ibm.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.