public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: [BUG] ftrace: WARNING: suspicious RCU usage
Date: Tue, 27 Jun 2017 17:44:46 -0700	[thread overview]
Message-ID: <20170628004446.GC3721@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170627185743.69d89859@gandalf.local.home>

On Tue, Jun 27, 2017 at 06:57:43PM -0400, Steven Rostedt wrote:
> On Wed, 28 Jun 2017 07:52:22 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
> 
> > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> > index e354e47..442b409 100644
> > --- a/kernel/rcu/tree.c
> > +++ b/kernel/rcu/tree.c
> > @@ -973,8 +973,10 @@ static void rcu_eqs_exit(bool user)
> >  	if (oldval & DYNTICK_TASK_NEST_MASK) {
> >  		rdtp->dynticks_nesting += DYNTICK_TASK_NEST_VALUE;
> >  	} else {
> > +		__this_cpu_inc(disable_rcu_irq_enter);
> >  		rdtp->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
> >  		rcu_eqs_exit_common(oldval, user);
> > +		__this_cpu_dec(disable_rcu_irq_enter);
> >  	}
> >  }
> >  
> 
> Looks like a good fix to me. Paul want to take this one?
> 
> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Why not?

How urgent is this, as in what release do you need it in?  (Default at
this point being v4.14, but non-default available upon request.)

							Thanx, Paul

------------------------------------------------------------------------

commit 2165b0a9bb37f0560f261986783e7c02bb37c353
Author: Masami Hiramatsu <mhiramat@kernel.org>
Date:   Tue Jun 27 17:41:25 2017 -0700

    rcu/tracing: Set disable_rcu_irq_enter on rcu_eqs_exit()
    
    Set disable_rcu_irq_enter on not only rcu_eqs_enter_common() but also
    rcu_eqs_exit(), since rcu_eqs_exit() suffers from the same issue as was
    fixed for rcu_eqs_enter_common() by commit 03ecd3f48e57 ("rcu/tracing:
    Add rcu_disabled to denote when rcu_irq_enter() will not work").
    
    Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
    Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index ca3076b073e4..2a6b610ef54f 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -952,8 +952,10 @@ static void rcu_eqs_exit(bool user)
 	if (oldval & DYNTICK_TASK_NEST_MASK) {
 		rdtp->dynticks_nesting += DYNTICK_TASK_NEST_VALUE;
 	} else {
+		__this_cpu_inc(disable_rcu_irq_enter);
 		rdtp->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
 		rcu_eqs_exit_common(oldval, user);
+		__this_cpu_dec(disable_rcu_irq_enter);
 	}
 }
 

      reply	other threads:[~2017-06-28  0:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 11:51 [BUG] ftrace: WARNING: suspicious RCU usage Masami Hiramatsu
2017-06-27 13:29 ` Steven Rostedt
2017-06-27 13:53   ` Masami Hiramatsu
2017-06-27 22:52     ` Masami Hiramatsu
2017-06-27 22:57       ` Steven Rostedt
2017-06-28  0:44         ` Paul E. McKenney [this message]

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=20170628004446.GC3721@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox