]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/ftrace: Add recursion protection in prepare_ftrace_return()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 15 Feb 2022 18:31:23 +0000 (19:31 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Feb 2022 12:09:47 +0000 (23:09 +1100)
commit3f576d96053ccae0a367376c6e43199f1b7a426c
tree6cac61e962dd1bf768a0fcbf9a90297720a91efc
parent6fe217d26c5e502a9478514e3372cc0787e7fbb4
powerpc/ftrace: Add recursion protection in prepare_ftrace_return()

The function_graph_enter() does not provide any recursion protection.

Add a protection in prepare_ftrace_return() in case
function_graph_enter() calls something that gets
function graph traced.

Fixes: cd06c5e61128 ("powerpc/ftrace: directly call of function graph tracer by ftrace caller")
Reported-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/74edf2ff0a60e66b0d9225a137100a86a0557032.1644949750.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/trace/ftrace.c