lkml.org 
[lkml]   [2020]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 11/11 v2.2] ftrace: Add recording of functions that caused recursion
On Tue, 3 Nov 2020 15:10:43 +0100
Petr Mladek <pmladek@suse.com> wrote:

> BTW: What is actually the purpose of paranoid_test, please?
>
> It prevents nested ftrace_record_recursion() calls on the same CPU
> (recursion, nesting from IRQ, NMI context).
>
> Parallel calls from different CPUs are still possible:
>
> CPU0 CPU1
> if (!atomic_read(&paranoid_test)) if (!atomic_read(&paranoid_test))
> // passes // passes
> atomic_inc(&paranoid_test); atomic_inc(&paranoid_test);
>
>
> I do not see how a nested call could cause crash while a parallel
> one would be OK.
>

Yeah, I should make that per cpu, but was lazy. ;-)

It was added at the end.

I'll update that to a per cpu, and local inc operations.

-- Steve

\
 
 \ /
  Last update: 2020-11-03 17:15    [W:0.239 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site