Skip to content

Commit 9e58236

Browse files
author
Herton R. Krzesinski
committed
Merge: Fix call trace from create_trace_option_files in kernel/trace/trace.c
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/1896 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2155737 Backport a missing patch from an earlier backport series to fix a call trace (BZ 2129758 backported commit 6621a70 but was missing the preceeding patch ef9188b). Signed-off-by: Thomas Huth <thuth@redhat.com> Approved-by: Cédric Le Goater <clg@redhat.com> Approved-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2 parents ece6f9e + 45608ae commit 9e58236

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

kernel/trace/trace.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6315,12 +6315,18 @@ static void tracing_set_nop(struct trace_array *tr)
63156315
tr->current_trace = &nop_trace;
63166316
}
63176317

6318+
static bool tracer_options_updated;
6319+
63186320
static void add_tracer_options(struct trace_array *tr, struct tracer *t)
63196321
{
63206322
/* Only enable if the directory has been created already. */
63216323
if (!tr->dir)
63226324
return;
63236325

6326+
/* Only create trace option files after update_tracer_options finish */
6327+
if (!tracer_options_updated)
6328+
return;
6329+
63246330
create_trace_option_files(tr, t);
63256331
}
63266332

@@ -9144,6 +9150,7 @@ static void __update_tracer_options(struct trace_array *tr)
91449150
static void update_tracer_options(struct trace_array *tr)
91459151
{
91469152
mutex_lock(&trace_types_lock);
9153+
tracer_options_updated = true;
91479154
__update_tracer_options(tr);
91489155
mutex_unlock(&trace_types_lock);
91499156
}

0 commit comments

Comments
 (0)