Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1252374

Re: [RFC][PATCH] tracing: Have stack tracer force RCU to be watching

From "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH] tracing: Have stack tracer force RCU to be watching
Date 2015-10-21 01:50 +0200
Message-ID <qlOPf-2bt-5@gated-at.bofh.it> (permalink)
References <qlHNL-qO-1@gated-at.bofh.it> <qlLHH-65j-13@gated-at.bofh.it> <qlMNs-7E9-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Oct 20, 2015 at 05:32:28PM -0400, Steven Rostedt wrote:
> On Tue, 20 Oct 2015 13:25:28 -0700
> "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
> 
> > On Tue, Oct 20, 2015 at 12:10:31PM -0400, Steven Rostedt wrote:
> > > 
> > > Paul,
> > > 
> > > I've spent a couple of days debugging this, and finally found that my
> > > stack tracer was calling the stack trace code, which calls
> > > __module_address() which asserts the below.
> > > 
> > > Is just calling rcu_irq_enter() and rcu_irq_exit() safe to do
> > > everywhere (with interrupts always disabled)? This patch appears to fix
> > > the bug.
> > 
> > Yep!  Just don't call it from an NMI handler.  And don't call it with
> > interrupts enabled.  The patch looks to have interrupts always disabled,
> > and the surrounding code doesn't look like NMI-safe code anyway, so
> > should be OK.
> > 
> > 							Thanx, Paul
> >
> 
> Hmm, good point about NMI handler. Right now I think the only thing
> protecting this from getting in the critical section while in NMI is
> the check that we are using the task struct stack. But that may not be
> enough in 32 bit.
> 
> I should probably add a "if (in_nmi()) return" somewhere.

Please!  ;-) ;-) ;-)

							Thanx, Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH] tracing: Have stack tracer force RCU to be watching Steven Rostedt <rostedt@goodmis.org> - 2015-10-20 18:20 +0200
  Re: [RFC][PATCH] tracing: Have stack tracer force RCU to be watching "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-20 22:30 +0200
    Re: [RFC][PATCH] tracing: Have stack tracer force RCU to be  watching Steven Rostedt <rostedt@goodmis.org> - 2015-10-20 23:40 +0200
      Re: [RFC][PATCH] tracing: Have stack tracer force RCU to be watching "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-21 01:50 +0200
        Re: [RFC][PATCH] tracing: Have stack tracer force RCU to be  watching Steven Rostedt <rostedt@goodmis.org> - 2015-10-21 02:00 +0200
          Re: [RFC][PATCH] tracing: Have stack tracer force RCU to be  watching Steven Rostedt <rostedt@goodmis.org> - 2015-10-21 19:50 +0200
      Re: [RFC][PATCH] tracing: Have stack tracer force RCU to be watching Peter Zijlstra <peterz@infradead.org> - 2015-10-21 10:10 +0200
        Re: [RFC][PATCH] tracing: Have stack tracer force RCU to be  watching Steven Rostedt <rostedt@goodmis.org> - 2015-10-21 13:40 +0200
          Re: [RFC][PATCH] tracing: Have stack tracer force RCU to be watching Peter Zijlstra <peterz@infradead.org> - 2015-10-21 14:00 +0200

csiph-web