]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ftrace: check for failure for all conversions
authorSteven Rostedt <srostedt@redhat.com>
Wed, 7 Oct 2009 20:57:56 +0000 (16:57 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 12 Oct 2009 19:40:09 +0000 (12:40 -0700)
commit 3279ba37db5d65c4ab0dcdee3b211ccb85bb563f upstream.

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.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/trace/ftrace.c

index 27510fa47e7b7ecf4ab0cdfa210fe44e5aba02d7..52eb25189928d9d8aa59f32fb9358c43baa9fb03 100644 (file)
@@ -1110,14 +1110,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();
 }