Message ID | 20210805154935.553422403@goodmis.org |
---|---|
State | Accepted |
Commit | ff41c28c4b54052942180d8b3f49e75f1445135a |
Headers | show |
Series | [for-linus,1/6] tracing: Fix NULL pointer dereference in start_creating | expand |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c59dd35a6da5..33899a71fdc1 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -9135,8 +9135,10 @@ static int trace_array_create_dir(struct trace_array *tr) return -EINVAL; ret = event_trace_add_tracer(tr->dir, tr); - if (ret) + if (ret) { tracefs_remove(tr->dir); + return ret; + } init_tracer_tracefs(tr, tr->dir); __update_tracer_options(tr);