]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ftrace: Make ftrace_graph_ent depth field signed
authorSteven Rostedt <rostedt@goodmis.org>
Fri, 2 Jan 2026 19:31:48 +0000 (14:31 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 7 Jan 2026 19:52:22 +0000 (14:52 -0500)
commit5232196ff49be08350b27f1ba8e1fad87afc9cdf
tree178d8e7e4b328950073b9149d95711aff46a53ea
parent6435ffd6c7fcba330dfa91c58dc30aed2df3d0bf
ftrace: Make ftrace_graph_ent depth field signed

The code has integrity checks to make sure that depth never goes below
zero. But the depth field has recently been converted to unsigned long
from "int" (for alignment reasons). As unsigned long can never be less
than zero, the integrity checks no longer work.

Convert depth to long from unsigned long to allow the integrity checks to
work again.

Cc: stable@vger.kernel.org
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: pengdonglin <pengdonglin@xiaomi.com>
Link: https://patch.msgid.link/20260102143148.251c2e16@gandalf.local.home
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/aS6kGi0maWBl-MjZ@stanley.mountain/
Fixes: f83ac7544fbf7 ("function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
include/linux/ftrace.h