Commit 95a05bf5 authored by Masami Hiramatsu (Google)'s avatar Masami Hiramatsu (Google) Committed by Alexander Gordeev
Browse files

s390/fgraph: Fix to remove ftrace_test_recursion_trylock()



Fix to remove ftrace_test_recursion_trylock() from ftrace_graph_func()
because commit d576aec2 ("fgraph: Get ftrace recursion lock in
function_graph_enter") has been moved it to function_graph_enter_regs()
already.

Reported-by: default avatarJiri Olsa <olsajiri@gmail.com>
Closes: https://lore.kernel.org/all/Z5O0shrdgeExZ2kF@krava/


Fixes: d576aec2 ("fgraph: Get ftrace recursion lock in function_graph_enter")
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Tested-by: default avatarJiri Olsa <jolsa@kernel.org>
Tested-by: default avatarIhor Solodrai <ihor.solodrai@linux.dev>
Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/173807817692.1854334.2985776940754607459.stgit@devnote2


Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
parent 2e04247f
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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 */