Skip to content

Commit

Permalink
ftrace: check for failure for all conversions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Oct 7, 2009
1 parent e7247a1 commit 3279ba3
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 3279ba3

Please sign in to comment.