summaryrefslogtreecommitdiffstats
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-10-07 22:57:56 +0200
committerSteven Rostedt <rostedt@goodmis.org>2009-10-07 23:22:24 +0200
commit3279ba37db5d65c4ab0dcdee3b211ccb85bb563f (patch)
treee0051b9110b15187c4aaaa980749ab829f2e8427 /kernel/trace/ftrace.c
parenttracing: correct module boundaries for ftrace_release (diff)
downloadlinux-3279ba37db5d65c4ab0dcdee3b211ccb85bb563f.tar.xz
linux-3279ba37db5d65c4ab0dcdee3b211ccb85bb563f.zip
ftrace: check for failure for all conversions
Due to legacy code from back when the dynamic tracer used a daemon, only core kernel code was checking for failures. This is no longer the case. We must check for failures any time we perform text modifications. Cc: stable@kernel.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r--kernel/trace/ftrace.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index c701476a648b..f136fe5da07a 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1074,14 +1074,9 @@ static void ftrace_replace_code(int enable)
failed = __ftrace_replace_code(rec, enable);
if (failed) {
rec->flags |= FTRACE_FL_FAILED;
- if ((system_state == SYSTEM_BOOTING) ||
- !core_kernel_text(rec->ip)) {
- ftrace_free_rec(rec);
- } else {
- ftrace_bug(failed, rec->ip);
- /* Stop processing */
- return;
- }
+ ftrace_bug(failed, rec->ip);
+ /* Stop processing */
+ return;
}
} while_for_each_ftrace_rec();
}