提交 0a3d7ce7 编写于 作者: N Namhyung Kim 提交者: Steven Rostedt

tracing: Check return value of tracing_dentry_percpu()

If tracing_dentry_percpu() failed, tracing_init_debugfs_percpu()
will try to create each cpu directories on debugfs' root directory
as d_percpu is NULL.

Link: http://lkml.kernel.org/r/1335143517-2285-1-git-send-email-namhyung.kim@lge.com

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: NNamhyung Kim <namhyung.kim@lge.com>
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 308f7eeb
...@@ -4474,6 +4474,9 @@ static void tracing_init_debugfs_percpu(long cpu) ...@@ -4474,6 +4474,9 @@ static void tracing_init_debugfs_percpu(long cpu)
struct dentry *d_cpu; struct dentry *d_cpu;
char cpu_dir[30]; /* 30 characters should be more than enough */ char cpu_dir[30]; /* 30 characters should be more than enough */
if (!d_percpu)
return;
snprintf(cpu_dir, 30, "cpu%ld", cpu); snprintf(cpu_dir, 30, "cpu%ld", cpu);
d_cpu = debugfs_create_dir(cpu_dir, d_percpu); d_cpu = debugfs_create_dir(cpu_dir, d_percpu);
if (!d_cpu) { if (!d_cpu) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册