diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-02-19 13:41:27 -0500 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-02-20 14:30:20 -0500 |
commit | 4377245aa93b65b6597e4b7bb460fb9abc48b56b (patch) | |
tree | 00eae2cbdd12e855bbde2f6cd6d1a6e6fd659a11 /kernel/trace/ftrace.c | |
parent | 90c7ac49aa819feb9433b5310089fca6399881c0 (diff) |
ftrace: break out modify loop immediately on detection of error
Impact: added precaution on failure detection
Break out of the modifying loop as soon as a failure is detected.
This is just an added precaution found by code review and was not
found by any bug chasing.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 72316d9647bd..11ad796ca049 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -561,8 +561,11 @@ static void ftrace_replace_code(int enable) | |||
561 | if ((system_state == SYSTEM_BOOTING) || | 561 | if ((system_state == SYSTEM_BOOTING) || |
562 | !core_kernel_text(rec->ip)) { | 562 | !core_kernel_text(rec->ip)) { |
563 | ftrace_free_rec(rec); | 563 | ftrace_free_rec(rec); |
564 | } else | 564 | } else { |
565 | ftrace_bug(failed, rec->ip); | 565 | ftrace_bug(failed, rec->ip); |
566 | /* Stop processing */ | ||
567 | return; | ||
568 | } | ||
566 | } | 569 | } |
567 | } | 570 | } |
568 | } | 571 | } |