]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390/fgraph: Fix to remove ftrace_test_recursion_trylock()
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Tue, 28 Jan 2025 15:29:37 +0000 (00:29 +0900)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Wed, 29 Jan 2025 14:12:31 +0000 (15:12 +0100)
Fix to remove ftrace_test_recursion_trylock() from ftrace_graph_func()
because commit d576aec24df9 ("fgraph: Get ftrace recursion lock in
function_graph_enter") has been moved it to function_graph_enter_regs()
already.

Reported-by: Jiri Olsa <olsajiri@gmail.com>
Closes: https://lore.kernel.org/all/Z5O0shrdgeExZ2kF@krava/
Fixes: d576aec24df9 ("fgraph: Get ftrace recursion lock in function_graph_enter")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Tested-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/173807817692.1854334.2985776940754607459.stgit@devnote2
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/kernel/ftrace.c

index c0b2c97efefb8cc810f740be0c6a2183d68ce535..63ba6306632ef39a806c00e919d55ddc5ea81a5c 100644 (file)
@@ -266,18 +266,13 @@ void ftrace_graph_func(unsigned long ip, unsigned long parent_ip,
                       struct ftrace_ops *op, struct ftrace_regs *fregs)
 {
        unsigned long *parent = &arch_ftrace_regs(fregs)->regs.gprs[14];
-       int bit;
 
        if (unlikely(ftrace_graph_is_dead()))
                return;
        if (unlikely(atomic_read(&current->tracing_graph_pause)))
                return;
-       bit = ftrace_test_recursion_trylock(ip, *parent);
-       if (bit < 0)
-               return;
        if (!function_graph_enter_regs(*parent, ip, 0, parent, fregs))
                *parent = (unsigned long)&return_to_handler;
-       ftrace_test_recursion_unlock(bit);
 }
 
 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */