diff options
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 39dca4e86a94..9e5841dc14b5 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -4144,9 +4144,9 @@ unregister_ftrace_function_probe_func(char *glob, struct trace_array *tr, | |||
4144 | int i, ret = -ENODEV; | 4144 | int i, ret = -ENODEV; |
4145 | int size; | 4145 | int size; |
4146 | 4146 | ||
4147 | if (glob && (strcmp(glob, "*") == 0 || !strlen(glob))) | 4147 | if (!glob || !strlen(glob) || !strcmp(glob, "*")) |
4148 | func_g.search = NULL; | 4148 | func_g.search = NULL; |
4149 | else if (glob) { | 4149 | else { |
4150 | int not; | 4150 | int not; |
4151 | 4151 | ||
4152 | func_g.type = filter_parse_regex(glob, strlen(glob), | 4152 | func_g.type = filter_parse_regex(glob, strlen(glob), |
@@ -4256,6 +4256,14 @@ unregister_ftrace_function_probe_func(char *glob, struct trace_array *tr, | |||
4256 | return ret; | 4256 | return ret; |
4257 | } | 4257 | } |
4258 | 4258 | ||
4259 | void clear_ftrace_function_probes(struct trace_array *tr) | ||
4260 | { | ||
4261 | struct ftrace_func_probe *probe, *n; | ||
4262 | |||
4263 | list_for_each_entry_safe(probe, n, &tr->func_probes, list) | ||
4264 | unregister_ftrace_function_probe_func(NULL, tr, probe->probe_ops); | ||
4265 | } | ||
4266 | |||
4259 | static LIST_HEAD(ftrace_commands); | 4267 | static LIST_HEAD(ftrace_commands); |
4260 | static DEFINE_MUTEX(ftrace_cmd_mutex); | 4268 | static DEFINE_MUTEX(ftrace_cmd_mutex); |
4261 | 4269 | ||
@@ -5055,7 +5063,7 @@ ftrace_graph_release(struct inode *inode, struct file *file) | |||
5055 | } | 5063 | } |
5056 | 5064 | ||
5057 | out: | 5065 | out: |
5058 | kfree(fgd->new_hash); | 5066 | free_ftrace_hash(fgd->new_hash); |
5059 | kfree(fgd); | 5067 | kfree(fgd); |
5060 | 5068 | ||
5061 | return ret; | 5069 | return ret; |