Patchwork [3.5.y.z,extended,stable] Patch "ftrace: Consistently restore trace function on sysctl" has been added to staging queue

login
register
mail settings
Submitter Luis Henriques
Date April 11, 2013, 9:09 a.m.
Message ID <1365671362-12307-1-git-send-email-luis.henriques@canonical.com>
Download mbox | patch
Permalink /patch/235641/
State New
Headers show

Comments

Luis Henriques - April 11, 2013, 9:09 a.m.
This is a note to let you know that I have just added a patch titled

    ftrace: Consistently restore trace function on sysctl

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

From f206634a8d544b9724f850a99cca00118ef876d9 Mon Sep 17 00:00:00 2001
From: Jan Kiszka <jan.kiszka@siemens.com>
Date: Tue, 26 Mar 2013 17:53:03 +0100
Subject: [PATCH] ftrace: Consistently restore trace function on sysctl
 enabling

commit 5000c418840b309251c5887f0b56503aae30f84c upstream.

If we reenable ftrace via syctl, we currently set ftrace_trace_function
based on the previous simplistic algorithm. This is inconsistent with
what update_ftrace_function does. So better call that helper instead.

Link: http://lkml.kernel.org/r/5151D26F.1070702@siemens.com

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 kernel/trace/ftrace.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

--
1.8.1.2

Patch

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 1b6ec54..00ea125 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -4375,12 +4375,8 @@  ftrace_enable_sysctl(struct ctl_table *table, int write,
 		ftrace_startup_sysctl();

 		/* we are starting ftrace again */
-		if (ftrace_ops_list != &ftrace_list_end) {
-			if (ftrace_ops_list->next == &ftrace_list_end)
-				ftrace_trace_function = ftrace_ops_list->func;
-			else
-				ftrace_trace_function = ftrace_ops_list_func;
-		}
+		if (ftrace_ops_list != &ftrace_list_end)
+			update_ftrace_function();

 	} else {
 		/* stopping ftrace calls (just send to ftrace_stub) */