lkml.org 
[lkml]   [2020]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/9] ftrace: Move the recursion testing into global headers
On Fri, 30 Oct 2020 10:13:50 +0100 (CET)
Miroslav Benes <mbenes@suse.cz> wrote:

> how does this work in case of NMI? trace_get_context_bit() returns 0 (it
> does not change later in the patch set). "start" in
> trace_test_and_set_recursion() is 0 zero too as used later in the patch
> set by ftrace_test_recursion_trylock(). So trace_test_and_set_recursion()
> returns 0. That is perfectly sane, but then...
>
> > +static __always_inline void trace_clear_recursion(int bit)
> > +{
> > + unsigned int val = current->trace_recursion;
> > +
> > + if (!bit)
> > + return;
>
> ... the bit is not cleared here.

Yeah, I found that and fixed it yesterday, which discovered stack
overflow in perf:

https://lore.kernel.org/r/20201030002722.766a22df@oasis.local.home

There's another bug that causes a false positive during interrupt
context transition. I have a fix for that too.

-- Steve

\
 
 \ /
  Last update: 2020-10-30 13:31    [W:0.108 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site