mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
eb9a7bf091
commit
34078a5e44
1 changed files with 2 additions and 3 deletions
|
@ -430,7 +430,7 @@ static void ftrace_replace_code(int enable)
|
||||||
if (failed && (rec->flags & FTRACE_FL_CONVERTED)) {
|
if (failed && (rec->flags & FTRACE_FL_CONVERTED)) {
|
||||||
rec->flags |= FTRACE_FL_FAILED;
|
rec->flags |= FTRACE_FL_FAILED;
|
||||||
if ((system_state == SYSTEM_BOOTING) ||
|
if ((system_state == SYSTEM_BOOTING) ||
|
||||||
!kernel_text_address(rec->ip)) {
|
!core_kernel_text(rec->ip)) {
|
||||||
ftrace_del_hash(rec);
|
ftrace_del_hash(rec);
|
||||||
ftrace_free_rec(rec);
|
ftrace_free_rec(rec);
|
||||||
}
|
}
|
||||||
|
@ -651,10 +651,9 @@ static int __ftrace_update_code(void *ignore)
|
||||||
ftrace_update_cnt++;
|
ftrace_update_cnt++;
|
||||||
} else {
|
} else {
|
||||||
if ((system_state == SYSTEM_BOOTING) ||
|
if ((system_state == SYSTEM_BOOTING) ||
|
||||||
!kernel_text_address(p->ip)) {
|
!core_kernel_text(p->ip)) {
|
||||||
ftrace_del_hash(p);
|
ftrace_del_hash(p);
|
||||||
ftrace_free_rec(p);
|
ftrace_free_rec(p);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue