Commit 072126f4529196f71a97960248bca54fd4554c2d
Committed by
Steven Rostedt
1 parent
41fb61c2d0
Exists in
master
and in
4 other branches
ftrace: Update filter when tracing enabled in set_ftrace_filter()
Currently, if set_ftrace_filter() is called when the ftrace_ops is active, the function filters will not be updated. They will only be updated when tracing is disabled and re-enabled. Update the functions immediately during set_ftrace_filter(). Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff
kernel/trace/ftrace.c
... | ... | @@ -2869,6 +2869,10 @@ |
2869 | 2869 | |
2870 | 2870 | mutex_lock(&ftrace_lock); |
2871 | 2871 | ret = ftrace_hash_move(ops, enable, orig_hash, hash); |
2872 | + if (!ret && ops->flags & FTRACE_OPS_FL_ENABLED | |
2873 | + && ftrace_enabled) | |
2874 | + ftrace_run_update_code(FTRACE_ENABLE_CALLS); | |
2875 | + | |
2872 | 2876 | mutex_unlock(&ftrace_lock); |
2873 | 2877 | |
2874 | 2878 | mutex_unlock(&ftrace_regex_lock); |