]> Git Repo - linux.git/commitdiff
tracing: Check return value of tracing_init_dentry()
authorNamhyung Kim <[email protected]>
Wed, 10 Apr 2013 00:18:12 +0000 (09:18 +0900)
committerSteven Rostedt <[email protected]>
Sat, 13 Apr 2013 03:02:32 +0000 (23:02 -0400)
Check return value and bail out if it's NULL.

Link: http://lkml.kernel.org/r/[email protected]
Cc: Frederic Weisbecker <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: [email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
kernel/trace/trace.c
kernel/trace/trace_stack.c
kernel/trace/trace_stat.c

index 07860b995752894828a6c408e6a946d3574c9d3b..72970793b40a09b2e44539dae8c80f51a8b7fa20 100644 (file)
@@ -5953,6 +5953,8 @@ static __init int tracer_init_debugfs(void)
        trace_access_lock_init();
 
        d_tracer = tracing_init_dentry();
+       if (!d_tracer)
+               return 0;
 
        init_tracer_debugfs(&global_trace, d_tracer);
 
index aab277b67fa9acdbb209a72db0b6d5110ef1901c..8c3f37e2dc4356e82ce13569b351b5f28693bfe5 100644 (file)
@@ -431,6 +431,8 @@ static __init int stack_trace_init(void)
        struct dentry *d_tracer;
 
        d_tracer = tracing_init_dentry();
+       if (!d_tracer)
+               return 0;
 
        trace_create_file("stack_max_size", 0644, d_tracer,
                        &max_stack_size, &stack_max_size_fops);
index 96cffb269e7360e131e445c8c0013c90419f0921..847f88a6194b4e4183e0ed08dd03828f6e5ff1bd 100644 (file)
@@ -307,6 +307,8 @@ static int tracing_stat_init(void)
        struct dentry *d_tracing;
 
        d_tracing = tracing_init_dentry();
+       if (!d_tracing)
+               return 0;
 
        stat_dir = debugfs_create_dir("trace_stat", d_tracing);
        if (!stat_dir)
This page took 0.065576 seconds and 4 git commands to generate.