Skip to content

Commit

Permalink
parisc/ftrace: Fix function graph tracing disablement
Browse files Browse the repository at this point in the history
commit a5f05a1 upstream.

Due to an apparent copy-paste bug, the parisc implementation of
ftrace_disable_ftrace_graph_caller() doesn't actually do anything.
It enables the (already-enabled) static key rather than disabling it.

The result is that after function graph tracing has been "disabled", any
subsequent (non-graph) function tracing will inadvertently also enable
the slow fgraph return address hijacking.

Fixes: 98f2926 ("parisc/ftrace: use static key to enable/disable function graph tracer")
Cc: [email protected] # 5.16+
Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Helge Deller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
jpoimboe authored and gregkh committed Dec 9, 2024
1 parent 185f065 commit 9665bbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/parisc/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ int ftrace_enable_ftrace_graph_caller(void)

int ftrace_disable_ftrace_graph_caller(void)
{
static_key_enable(&ftrace_graph_enable.key);
static_key_disable(&ftrace_graph_enable.key);
return 0;
}
#endif
Expand Down

0 comments on commit 9665bbe

Please sign in to comment.