* [PATCH] tracing: Check return value of tracing_dentry_percpu()
@ 2012-04-23 1:11 Namhyung Kim
2012-05-15 8:41 ` Namhyung Kim
2012-05-19 10:20 ` [tip:perf/core] " tip-bot for Namhyung Kim
0 siblings, 2 replies; 3+ messages in thread
From: Namhyung Kim @ 2012-04-23 1:11 UTC (permalink / raw)
To: Steven Rostedt
Cc: Namhyung Kim, Frederic Weisbecker, Ingo Molnar, linux-kernel
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.
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
---
kernel/trace/trace.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ed7b5d1e12f4..54df9a672fd9 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4367,6 +4367,9 @@ static void tracing_init_debugfs_percpu(long cpu)
struct dentry *d_cpu;
char cpu_dir[30]; /* 30 characters should be more than enough */
+ if (!d_percpu)
+ return;
+
snprintf(cpu_dir, 30, "cpu%ld", cpu);
d_cpu = debugfs_create_dir(cpu_dir, d_percpu);
if (!d_cpu) {
--
1.7.10
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] tracing: Check return value of tracing_dentry_percpu()
2012-04-23 1:11 [PATCH] tracing: Check return value of tracing_dentry_percpu() Namhyung Kim
@ 2012-05-15 8:41 ` Namhyung Kim
2012-05-19 10:20 ` [tip:perf/core] " tip-bot for Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2012-05-15 8:41 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Frederic Weisbecker, Ingo Molnar, linux-kernel
Hi, Steve.
Can you have a look at this?
Thanks,
Namhyung
On Mon, 23 Apr 2012 10:11:57 +0900, Namhyung Kim wrote:
> 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.
>
> Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
> ---
> kernel/trace/trace.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index ed7b5d1e12f4..54df9a672fd9 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -4367,6 +4367,9 @@ static void tracing_init_debugfs_percpu(long cpu)
> struct dentry *d_cpu;
> char cpu_dir[30]; /* 30 characters should be more than enough */
>
> + if (!d_percpu)
> + return;
> +
> snprintf(cpu_dir, 30, "cpu%ld", cpu);
> d_cpu = debugfs_create_dir(cpu_dir, d_percpu);
> if (!d_cpu) {
^ permalink raw reply [flat|nested] 3+ messages in thread* [tip:perf/core] tracing: Check return value of tracing_dentry_percpu()
2012-04-23 1:11 [PATCH] tracing: Check return value of tracing_dentry_percpu() Namhyung Kim
2012-05-15 8:41 ` Namhyung Kim
@ 2012-05-19 10:20 ` tip-bot for Namhyung Kim
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Namhyung Kim @ 2012-05-19 10:20 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, linux-kernel, hpa, mingo, fweisbec, rostedt, namhyung.kim, tglx
Commit-ID: 0a3d7ce7e6caa8c39cb5184bd9047a01a40abc2a
Gitweb: http://git.kernel.org/tip/0a3d7ce7e6caa8c39cb5184bd9047a01a40abc2a
Author: Namhyung Kim <namhyung.kim@lge.com>
AuthorDate: Mon, 23 Apr 2012 10:11:57 +0900
Committer: Steven Rostedt <rostedt@goodmis.org>
CommitDate: Wed, 16 May 2012 19:50:37 -0400
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: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index dfbd86c..0ed4df0 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4474,6 +4474,9 @@ static void tracing_init_debugfs_percpu(long cpu)
struct dentry *d_cpu;
char cpu_dir[30]; /* 30 characters should be more than enough */
+ if (!d_percpu)
+ return;
+
snprintf(cpu_dir, 30, "cpu%ld", cpu);
d_cpu = debugfs_create_dir(cpu_dir, d_percpu);
if (!d_cpu) {
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-19 10:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-23 1:11 [PATCH] tracing: Check return value of tracing_dentry_percpu() Namhyung Kim
2012-05-15 8:41 ` Namhyung Kim
2012-05-19 10:20 ` [tip:perf/core] " tip-bot for Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome