Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-06 Thread Paul E. McKenney
On Thu, Apr 06, 2017 at 10:14:25AM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 21:15:15 -0700 > "Paul E. McKenney" wrote: > \> > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > > > index 8efd9fe..28e3019 100644 > > > --- a/kernel/trace/ftrace.c > > >

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-06 Thread Paul E. McKenney
On Thu, Apr 06, 2017 at 10:14:25AM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 21:15:15 -0700 > "Paul E. McKenney" wrote: > \> > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > > > index 8efd9fe..28e3019 100644 > > > --- a/kernel/trace/ftrace.c > > > +++ b/kernel/trace/ftrace.c

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-06 Thread Steven Rostedt
On Wed, 5 Apr 2017 21:15:15 -0700 "Paul E. McKenney" wrote: \> > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > > index 8efd9fe..28e3019 100644 > > --- a/kernel/trace/ftrace.c > > +++ b/kernel/trace/ftrace.c > > @@ -2808,18 +2808,28 @@ static int

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-06 Thread Steven Rostedt
On Wed, 5 Apr 2017 21:15:15 -0700 "Paul E. McKenney" wrote: \> > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > > index 8efd9fe..28e3019 100644 > > --- a/kernel/trace/ftrace.c > > +++ b/kernel/trace/ftrace.c > > @@ -2808,18 +2808,28 @@ static int ftrace_shutdown(struct ftrace_ops

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 10:12:24PM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 10:59:25 -0700 > "Paul E. McKenney" wrote: > > > > > Could you please let me know if tracing happens in NMI handlers? > > > > If so, a bit of additional code will be needed. > > > >

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 10:12:24PM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 10:59:25 -0700 > "Paul E. McKenney" wrote: > > > > > Could you please let me know if tracing happens in NMI handlers? > > > > If so, a bit of additional code will be needed. > > > > > > > >

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 09:31:45PM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 13:42:29 -0700 > "Paul E. McKenney" wrote: > > > > OK, do you want me to send you a patch, or should I take your patch > > > into my tree and add this? > > > > Given that I don't

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 09:31:45PM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 13:42:29 -0700 > "Paul E. McKenney" wrote: > > > > OK, do you want me to send you a patch, or should I take your patch > > > into my tree and add this? > > > > Given that I don't seem to have

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
On Wed, 5 Apr 2017 10:59:25 -0700 "Paul E. McKenney" wrote: > > > Could you please let me know if tracing happens in NMI handlers? > > > If so, a bit of additional code will be needed. > > > > > > Thanx, Paul > > > >

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
On Wed, 5 Apr 2017 10:59:25 -0700 "Paul E. McKenney" wrote: > > > Could you please let me know if tracing happens in NMI handlers? > > > If so, a bit of additional code will be needed. > > > > > > Thanx, Paul > > > > > > PS. Which reminds me,

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
On Wed, 5 Apr 2017 13:42:29 -0700 "Paul E. McKenney" wrote: > > OK, do you want me to send you a patch, or should I take your patch > > into my tree and add this? > > Given that I don't seem to have disable_stack_tracer() and > enable_stack_tracer(), could you

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
On Wed, 5 Apr 2017 13:42:29 -0700 "Paul E. McKenney" wrote: > > OK, do you want me to send you a patch, or should I take your patch > > into my tree and add this? > > Given that I don't seem to have disable_stack_tracer() and > enable_stack_tracer(), could you please add them in? That's what

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 03:52:23PM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 12:39:28 -0700 > "Paul E. McKenney" wrote: > > > Here's the crucial part of that stack dump again: > > > > > > save_stack_trace+0x1b/0x1d > > > check_stack+0xec/0x24a > > >

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 03:52:23PM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 12:39:28 -0700 > "Paul E. McKenney" wrote: > > > Here's the crucial part of that stack dump again: > > > > > > save_stack_trace+0x1b/0x1d > > > check_stack+0xec/0x24a > > > stack_trace_call+0x40/0x53 > > >

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
On Wed, 5 Apr 2017 12:39:28 -0700 "Paul E. McKenney" wrote: > > Here's the crucial part of that stack dump again: > > > > save_stack_trace+0x1b/0x1d > > check_stack+0xec/0x24a > > stack_trace_call+0x40/0x53 > > 0xa0026077 > > ?

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
On Wed, 5 Apr 2017 12:39:28 -0700 "Paul E. McKenney" wrote: > > Here's the crucial part of that stack dump again: > > > > save_stack_trace+0x1b/0x1d > > check_stack+0xec/0x24a > > stack_trace_call+0x40/0x53 > > 0xa0026077 > > ? ftrace_graph_caller+0x78/0xa8 > > ?

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 03:21:41PM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 12:08:10 -0700 > "Paul E. McKenney" wrote: > > > On Wed, Apr 05, 2017 at 02:54:25PM -0400, Steven Rostedt wrote: > > > On Wed, 5 Apr 2017 10:59:25 -0700 > > > "Paul E. McKenney"

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 03:21:41PM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 12:08:10 -0700 > "Paul E. McKenney" wrote: > > > On Wed, Apr 05, 2017 at 02:54:25PM -0400, Steven Rostedt wrote: > > > On Wed, 5 Apr 2017 10:59:25 -0700 > > > "Paul E. McKenney" wrote: > > > > > > > > Note,

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
On Wed, 5 Apr 2017 12:08:10 -0700 "Paul E. McKenney" wrote: > On Wed, Apr 05, 2017 at 02:54:25PM -0400, Steven Rostedt wrote: > > On Wed, 5 Apr 2017 10:59:25 -0700 > > "Paul E. McKenney" wrote: > > > > > > Note, this has nothing to do

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
On Wed, 5 Apr 2017 12:08:10 -0700 "Paul E. McKenney" wrote: > On Wed, Apr 05, 2017 at 02:54:25PM -0400, Steven Rostedt wrote: > > On Wed, 5 Apr 2017 10:59:25 -0700 > > "Paul E. McKenney" wrote: > > > > > > Note, this has nothing to do with trace_rcu_dyntick(). It's the > > > > function

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 02:54:25PM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 10:59:25 -0700 > "Paul E. McKenney" wrote: > > > > Note, this has nothing to do with trace_rcu_dyntick(). It's the > > > function tracer tracing inside RCU, calling the stack tracer

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 02:54:25PM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 10:59:25 -0700 > "Paul E. McKenney" wrote: > > > > Note, this has nothing to do with trace_rcu_dyntick(). It's the > > > function tracer tracing inside RCU, calling the stack tracer to record > > > a new stack

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
On Wed, 5 Apr 2017 10:59:25 -0700 "Paul E. McKenney" wrote: > > Note, this has nothing to do with trace_rcu_dyntick(). It's the > > function tracer tracing inside RCU, calling the stack tracer to record > > a new stack if it sees its larger than any stack before. All

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
On Wed, 5 Apr 2017 10:59:25 -0700 "Paul E. McKenney" wrote: > > Note, this has nothing to do with trace_rcu_dyntick(). It's the > > function tracer tracing inside RCU, calling the stack tracer to record > > a new stack if it sees its larger than any stack before. All I need is > > a way to tell

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 12:45:39PM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 09:25:15 -0700 > "Paul E. McKenney" wrote: > > > > Thoughts? > > > > Ouch!!! > > > > I really blew it telling you that you can use rcu_irq_enter()!!! > > > > RCU's eqs code

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 12:45:39PM -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 09:25:15 -0700 > "Paul E. McKenney" wrote: > > > > Thoughts? > > > > Ouch!!! > > > > I really blew it telling you that you can use rcu_irq_enter()!!! > > > > RCU's eqs code disables interrupts, but has a

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
On Wed, 5 Apr 2017 09:25:15 -0700 "Paul E. McKenney" wrote: > > Thoughts? > > Ouch!!! > > I really blew it telling you that you can use rcu_irq_enter()!!! > > RCU's eqs code disables interrupts, but has a call to the trace code > exactly where it cannot handle an

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
On Wed, 5 Apr 2017 09:25:15 -0700 "Paul E. McKenney" wrote: > > Thoughts? > > Ouch!!! > > I really blew it telling you that you can use rcu_irq_enter()!!! > > RCU's eqs code disables interrupts, but has a call to the trace code > exactly where it cannot handle an interrupt. Your

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 09:32:07AM -0400, Steven Rostedt wrote: > Hi Paul, > > My tests are triggering the following when I have lockdep enabled and > running the stack tracer: > > [ cut here ] > WARNING: CPU: 0 PID: 0 at >

Re: [BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Paul E. McKenney
On Wed, Apr 05, 2017 at 09:32:07AM -0400, Steven Rostedt wrote: > Hi Paul, > > My tests are triggering the following when I have lockdep enabled and > running the stack tracer: > > [ cut here ] > WARNING: CPU: 0 PID: 0 at >

[BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
Hi Paul, My tests are triggering the following when I have lockdep enabled and running the stack tracer: [ cut here ] WARNING: CPU: 0 PID: 0 at /work/autotest/nobackup/linux-test.git/kernel/module.c:271 module_assert_mutex_or_preempt+0x4f/0x51 Modules linked in: ppdev

[BUG] stack tracing causes: kernel/module.c:271 module_assert_mutex_or_preempt

2017-04-05 Thread Steven Rostedt
Hi Paul, My tests are triggering the following when I have lockdep enabled and running the stack tracer: [ cut here ] WARNING: CPU: 0 PID: 0 at /work/autotest/nobackup/linux-test.git/kernel/module.c:271 module_assert_mutex_or_preempt+0x4f/0x51 Modules linked in: ppdev