Skip to content

Commit

Permalink
ftrace: break out modify loop immediately on detection of error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Rostedt committed Feb 20, 2009
1 parent 90c7ac4 commit 4377245
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,11 @@ static void ftrace_replace_code(int enable)
if ((system_state == SYSTEM_BOOTING) ||
!core_kernel_text(rec->ip)) {
ftrace_free_rec(rec);
} else
} else {
ftrace_bug(failed, rec->ip);
/* Stop processing */
return;
}
}
}
}
Expand Down

0 comments on commit 4377245

Please sign in to comment.