diff options
| -rw-r--r-- | kernel/trace/trace_events.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index a0b41cc26f26..85ec10fbb38d 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
| @@ -102,7 +102,7 @@ static int ftrace_set_clr_event(char *buf, int set) | |||
| 102 | mutex_lock(&event_mutex); | 102 | mutex_lock(&event_mutex); |
| 103 | events_for_each(call) { | 103 | events_for_each(call) { |
| 104 | 104 | ||
| 105 | if (!call->name) | 105 | if (!call->name || !call->regfunc) |
| 106 | continue; | 106 | continue; |
| 107 | 107 | ||
| 108 | if (match && | 108 | if (match && |
| @@ -207,8 +207,20 @@ t_next(struct seq_file *m, void *v, loff_t *pos) | |||
| 207 | 207 | ||
| 208 | (*pos)++; | 208 | (*pos)++; |
| 209 | 209 | ||
| 210 | if ((unsigned long)call >= (unsigned long)__stop_ftrace_events) | 210 | for (;;) { |
| 211 | return NULL; | 211 | if ((unsigned long)call >= (unsigned long)__stop_ftrace_events) |
| 212 | return NULL; | ||
| 213 | |||
| 214 | /* | ||
| 215 | * The ftrace subsystem is for showing formats only. | ||
| 216 | * They can not be enabled or disabled via the event files. | ||
| 217 | */ | ||
| 218 | if (call->regfunc) | ||
| 219 | break; | ||
| 220 | |||
| 221 | call++; | ||
| 222 | next = call; | ||
| 223 | } | ||
| 212 | 224 | ||
| 213 | m->private = ++next; | 225 | m->private = ++next; |
| 214 | 226 | ||
