diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2013-03-26 17:53:03 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-04-25 20:25:34 +0100 |
commit | b7e45b967b5bcd8ab3b9d5111bf1f17d89c71d3f (patch) | |
tree | 721a24d8844297c95b6a61017a7b0d1d4715cf8a | |
parent | 4dfc47d29210411ed765ce966c580c5b41e32841 (diff) | |
download | linux-stable-b7e45b967b5bcd8ab3b9d5111bf1f17d89c71d3f.tar.gz linux-stable-b7e45b967b5bcd8ab3b9d5111bf1f17d89c71d3f.tar.bz2 linux-stable-b7e45b967b5bcd8ab3b9d5111bf1f17d89c71d3f.zip |
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: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | kernel/trace/ftrace.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 0943d2a74491..1b378d04573c 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -3964,12 +3964,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) */ |