Skip to content

Commit

Permalink
ftrace: prevent freeing of all failed updates
Browse files Browse the repository at this point in the history
Steven Rostedt wrote:
> If we unload a module and reload it, will it ever get converted again?

The intent was always to filter core kernel functions to prevent their freeing.
Here's a fix which should allow re-recording of module call-sites.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Abhishek Sagar authored and Ingo Molnar committed Jun 10, 2008
1 parent eb9a7bf commit 34078a5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ static void ftrace_replace_code(int enable)
if (failed && (rec->flags & FTRACE_FL_CONVERTED)) {
rec->flags |= FTRACE_FL_FAILED;
if ((system_state == SYSTEM_BOOTING) ||
!kernel_text_address(rec->ip)) {
!core_kernel_text(rec->ip)) {
ftrace_del_hash(rec);
ftrace_free_rec(rec);
}
Expand Down Expand Up @@ -651,10 +651,9 @@ static int __ftrace_update_code(void *ignore)
ftrace_update_cnt++;
} else {
if ((system_state == SYSTEM_BOOTING) ||
!kernel_text_address(p->ip)) {
!core_kernel_text(p->ip)) {
ftrace_del_hash(p);
ftrace_free_rec(p);

}
}
}
Expand Down

0 comments on commit 34078a5

Please sign in to comment.