diff options
author | Abhishek Sagar <sagar.abhishek@gmail.com> | 2008-06-02 23:03:41 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-10 05:59:05 -0400 |
commit | 34078a5e44db3cbed2e0ed580c29a39d94e0cd97 (patch) | |
tree | 30bc17928302d6e38f352ab7fb11d1907906d058 | |
parent | eb9a7bf09172f409c10ec9560adeea95bb4045f5 (diff) |
ftrace: prevent freeing of all failed updates
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>
-rw-r--r-- | kernel/trace/ftrace.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index ad568c742bfc..0118979e211f 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -430,7 +430,7 @@ static void ftrace_replace_code(int enable) | |||
430 | if (failed && (rec->flags & FTRACE_FL_CONVERTED)) { | 430 | if (failed && (rec->flags & FTRACE_FL_CONVERTED)) { |
431 | rec->flags |= FTRACE_FL_FAILED; | 431 | rec->flags |= FTRACE_FL_FAILED; |
432 | if ((system_state == SYSTEM_BOOTING) || | 432 | if ((system_state == SYSTEM_BOOTING) || |
433 | !kernel_text_address(rec->ip)) { | 433 | !core_kernel_text(rec->ip)) { |
434 | ftrace_del_hash(rec); | 434 | ftrace_del_hash(rec); |
435 | ftrace_free_rec(rec); | 435 | ftrace_free_rec(rec); |
436 | } | 436 | } |
@@ -651,10 +651,9 @@ static int __ftrace_update_code(void *ignore) | |||
651 | ftrace_update_cnt++; | 651 | ftrace_update_cnt++; |
652 | } else { | 652 | } else { |
653 | if ((system_state == SYSTEM_BOOTING) || | 653 | if ((system_state == SYSTEM_BOOTING) || |
654 | !kernel_text_address(p->ip)) { | 654 | !core_kernel_text(p->ip)) { |
655 | ftrace_del_hash(p); | 655 | ftrace_del_hash(p); |
656 | ftrace_free_rec(p); | 656 | ftrace_free_rec(p); |
657 | |||
658 | } | 657 | } |
659 | } | 658 | } |
660 | } | 659 | } |