public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [for-next][PATCH 2/7] tracing: Fix off-by-one on allocating stat->pages
       [not found] <20130419140402.730041313@goodmis.org>
@ 2013-04-19 14:04 ` Steven Rostedt
  2013-04-19 14:04 ` [for-next][PATCH 3/7] tracing: Reset ftrace_graph_filter_enabled if count is zero Steven Rostedt
  2013-04-19 14:04 ` [for-next][PATCH 5/7] tracing: Check return value of tracing_init_dentry() Steven Rostedt
  2 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2013-04-19 14:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Namhyung Kim,
	stable, Namhyung Kim

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

From: Namhyung Kim <namhyung.kim@lge.com>

The first page was allocated separately, so no need to start from 0.

Link: http://lkml.kernel.org/r/1364820385-32027-2-git-send-email-namhyung@kernel.org

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: stable@vger.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/ftrace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 548a1f7..c9f3149 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -676,7 +676,7 @@ int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
 
 	pages = DIV_ROUND_UP(functions, PROFILES_PER_PAGE);
 
-	for (i = 0; i < pages; i++) {
+	for (i = 1; i < pages; i++) {
 		pg->next = (void *)get_zeroed_page(GFP_KERNEL);
 		if (!pg->next)
 			goto out_free;
-- 
1.7.10.4



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [for-next][PATCH 3/7] tracing: Reset ftrace_graph_filter_enabled if count is zero
       [not found] <20130419140402.730041313@goodmis.org>
  2013-04-19 14:04 ` [for-next][PATCH 2/7] tracing: Fix off-by-one on allocating stat->pages Steven Rostedt
@ 2013-04-19 14:04 ` Steven Rostedt
  2013-04-19 14:04 ` [for-next][PATCH 5/7] tracing: Check return value of tracing_init_dentry() Steven Rostedt
  2 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2013-04-19 14:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Namhyung Kim,
	stable, Namhyung Kim

[-- Attachment #1: Type: text/plain, Size: 924 bytes --]

From: Namhyung Kim <namhyung.kim@lge.com>

The ftrace_graph_count can be decreased with a "!" pattern, so that
the enabled flag should be updated too.

Link: http://lkml.kernel.org/r/1365663698-2413-1-git-send-email-namhyung@kernel.org

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: stable@vger.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/ftrace.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index c9f3149..9e31987 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3792,7 +3792,8 @@ out:
 	if (fail)
 		return -EINVAL;
 
-	ftrace_graph_filter_enabled = 1;
+	ftrace_graph_filter_enabled = !!(*idx);
+
 	return 0;
 }
 
-- 
1.7.10.4



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [for-next][PATCH 5/7] tracing: Check return value of tracing_init_dentry()
       [not found] <20130419140402.730041313@goodmis.org>
  2013-04-19 14:04 ` [for-next][PATCH 2/7] tracing: Fix off-by-one on allocating stat->pages Steven Rostedt
  2013-04-19 14:04 ` [for-next][PATCH 3/7] tracing: Reset ftrace_graph_filter_enabled if count is zero Steven Rostedt
@ 2013-04-19 14:04 ` Steven Rostedt
  2 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2013-04-19 14:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Namhyung Kim,
	stable, Namhyung Kim

[-- Attachment #1: Type: text/plain, Size: 1785 bytes --]

From: Namhyung Kim <namhyung.kim@lge.com>

Check return value and bail out if it's NULL.

Link: http://lkml.kernel.org/r/1365553093-10180-2-git-send-email-namhyung@kernel.org

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: stable@vger.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace.c       |    2 ++
 kernel/trace/trace_stack.c |    2 ++
 kernel/trace/trace_stat.c  |    2 ++
 3 files changed, 6 insertions(+)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 07860b9..7297079 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -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);
 
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
index aab277b..8c3f37e 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -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);
diff --git a/kernel/trace/trace_stat.c b/kernel/trace/trace_stat.c
index 96cffb2..847f88a 100644
--- a/kernel/trace/trace_stat.c
+++ b/kernel/trace/trace_stat.c
@@ -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)
-- 
1.7.10.4



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-19 14:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20130419140402.730041313@goodmis.org>
2013-04-19 14:04 ` [for-next][PATCH 2/7] tracing: Fix off-by-one on allocating stat->pages Steven Rostedt
2013-04-19 14:04 ` [for-next][PATCH 3/7] tracing: Reset ftrace_graph_filter_enabled if count is zero Steven Rostedt
2013-04-19 14:04 ` [for-next][PATCH 5/7] tracing: Check return value of tracing_init_dentry() Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox