diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-07-13 15:08:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-03 09:18:54 -0800 |
commit | 2ffe3ccf80eba0ac9ca71c41e7357d92f1c08fc3 (patch) | |
tree | b25759efa685d002b043e657fa3d05624c85eaaa /kernel/trace | |
parent | f935e6192f9e068da8f8395f032ff4b721fe8510 (diff) |
ftrace: Update filter when tracing enabled in set_ftrace_filter()
commit 072126f4529196f71a97960248bca54fd4554c2d upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 1eef6cf38d51..6b1e596bd3a0 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -2901,6 +2901,10 @@ ftrace_set_regex(struct ftrace_ops *ops, unsigned char *buf, int len, mutex_lock(&ftrace_lock); ret = ftrace_hash_move(ops, enable, orig_hash, hash); + if (!ret && ops->flags & FTRACE_OPS_FL_ENABLED + && ftrace_enabled) + ftrace_run_update_code(FTRACE_ENABLE_CALLS); + mutex_unlock(&ftrace_lock); mutex_unlock(&ftrace_regex_lock); |