mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
ftrace fix for 6.16:
- Do not blindly enable function_graph tracer when updating funcgraph-args When the option to trace function arguments in the function graph trace is updated, it requires the function graph tracer to switch its callback routine. It disables function graph tracing, updates the callback and then re-enables function graph tracing. The issue is that it doesn't check if function graph tracing is currently enabled or not. If it is not enabled, it will try to disable it and re-enable it (which will actually enable it even though it is not the current tracer). This cause an issue in the accounting and will trigger a WARN_ON() if the function tracer is enabled after that. -----BEGIN PGP SIGNATURE----- iIoEABYKADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCaFLfBRQccm9zdGVkdEBn b29kbWlzLm9yZwAKCRAp5XQQmuv6qn5bAQDkMJYRnqh6tPekKooigRJ05JfBDTnv ZlR2WZXxKUEzswEAyefKlAR/2mYlZSd7AObOnq4WxGxRSjDsplGN3sm2EgE= =ngiv -----END PGP SIGNATURE----- Merge tag 'ftrace-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull ftrace fix from Steven Rostedt: - Do not blindly enable function_graph tracer when updating funcgraph-args When the option to trace function arguments in the function graph trace is updated, it requires the function graph tracer to switch its callback routine. It disables function graph tracing, updates the callback and then re-enables function graph tracing. The issue is that it doesn't check if function graph tracing is currently enabled or not. If it is not enabled, it will try to disable it and re-enable it (which will actually enable it even though it is not the current tracer). This causes an issue in the accounting and will trigger a WARN_ON() if the function tracer is enabled after that. * tag 'ftrace-v6.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: fgraph: Do not enable function_graph tracer when setting funcgraph-args
This commit is contained in:
commit
5da3ff1fd0
|
|
@ -455,10 +455,16 @@ static int graph_trace_init(struct trace_array *tr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct tracer graph_trace;
|
||||
|
||||
static int ftrace_graph_trace_args(struct trace_array *tr, int set)
|
||||
{
|
||||
trace_func_graph_ent_t entry;
|
||||
|
||||
/* Do nothing if the current tracer is not this tracer */
|
||||
if (tr->current_trace != &graph_trace)
|
||||
return 0;
|
||||
|
||||
if (set)
|
||||
entry = trace_graph_entry_args;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user