diff mbox series

[1/2] s390: fgraph: Fix to remove ftrace_test_recursion_trylock()

Message ID 173807817692.1854334.2985776940754607459.stgit@devnote2 (mailing list archive)
State Accepted
Commit 95a05bf552adcb665af57b2958506a4395ab2f5e
Headers show
Series tracing: s390: Fix fprobes on s390 | expand

Commit Message

Masami Hiramatsu (Google) Jan. 28, 2025, 3:29 p.m. UTC
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>

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>
---
 arch/s390/kernel/ftrace.c |    5 -----
 1 file changed, 5 deletions(-)

Comments

Ihor Solodrai Jan. 29, 2025, 12:36 a.m. UTC | #1
January 28, 2025 at 7:29 AM, "Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:



> 
> From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> 
> 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>
> 
> [...]

Hi Masami,

Can confirm this patch fixes missed/kprobe_recursion BPF selftests on s390x:
https://github.com/kernel-patches/vmtest/actions/runs/13021621468/job/36324248903

Tested-by: Ihor Solodrai <ihor.solodrai@linux.dev>

Thanks!
diff mbox series

Patch

diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c
index c0b2c97efefb..63ba6306632e 100644
--- a/arch/s390/kernel/ftrace.c
+++ b/arch/s390/kernel/ftrace.c
@@ -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 */