From: "Steven Rostedt (Red Hat)" Do not bother creating tracer options if no tracing directory exists. If a tracer is enabled via the command line, and is started before the tracing directory is created, then it wont have its tracer specific options created. Signed-off-by: Steven Rostedt --- kernel/trace/trace.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 38c613ede10d..d4627f15407a 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -4172,8 +4172,11 @@ static int tracing_set_tracer(struct trace_array *tr, const char *buf) free_snapshot(tr); } #endif - /* Currently, only the top instance has options */ - if (tr->flags & TRACE_ARRAY_FL_GLOBAL) { + /* + * Only enable if the directory has been created already. + * Currently, only the top instance has options + */ + if (tr->dir && tr->flags & TRACE_ARRAY_FL_GLOBAL) { destroy_trace_option_files(topts); topts = create_trace_option_files(tr, t); } -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/