lkml.org 
[lkml]   [2023]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:sched/core] [tracing, hardirq] 9aedeaed6f: WARNING:suspicious_RCU_usage
On Fri, 20 Jan 2023 10:51:18 +0100
Peter Zijlstra <peterz@infradead.org> wrote:

> > does trigger the issue, you can then bisect the functions with the script:
> >
> > scripts/tracing/ftrace-bisect.sh
>
> Pff, that all sounds like actual work :-)
>
> Instead I did me the below hack and added my early_printk() hacks and
> that got me a usable backtrace.

Well, if you system is still running after the issue, then sure. I created
this when it would cause a triple fault reboot. In which case, there was no
real debugging output to use.

-- Steve


>
> diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
> index 5e7ead52cfdb..7defc6e24f8f 100644
> --- a/arch/x86/kernel/ftrace.c
> +++ b/arch/x86/kernel/ftrace.c
> @@ -646,6 +646,9 @@ void prepare_ftrace_return(unsigned long ip, unsigned long *parent,
> if (unlikely(atomic_read(&current->tracing_graph_pause)))
> return;
>
> + if (WARN_ONCE(!rcu_is_watching(), "RCU not on for: %pS\n", (void *)ip))
> + return;
> +
> bit = ftrace_test_recursion_trylock(ip, *parent);
> if (bit < 0)
> return;

\
 
 \ /
  Last update: 2023-03-26 23:51    [W:0.044 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site