Files
linux-stable-mirror/kernel
Shengming Hu 91892dafcc function_graph: Restore direct mode when callbacks drop to one
[ Upstream commit 53b2fae90f ]

When registering a second fgraph callback, direct path is disabled and
array loop is used instead.  When ftrace_graph_active falls back to one,
we try to re-enable direct mode via ftrace_graph_enable_direct(true, ...).
But ftrace_graph_enable_direct() incorrectly disables the static key
rather than enabling it.  This leaves fgraph_do_direct permanently off
after first multi-callback transition, so direct fast mode is never
restored.

Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260213142932519cuWSpEXeS4-UnCvNXnK2P@zte.com.cn
Fixes: cc60ee813b ("function_graph: Use static_call and branch to optimize entry function")
Signed-off-by: Shengming Hu <hu.shengming@zte.com.cn>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-03-04 07:21:57 -05:00
..
2025-11-24 10:35:59 +01:00
2026-03-04 07:19:34 -05:00
2025-06-27 11:11:45 +01:00
2025-12-18 13:54:50 +01:00