mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-16 07:28:12 +00:00
Guilherme Cox found that:
There is, however, a potential bug if there is an item with code zero
that is not the first one in the symbol list, since eval_flag(..)
returns 0 when it doesn't find anything.
That is, if you have the following enums:
enum {
FOO_START = 0,
FOO_GO = 1,
FOO_END = 2
}
and then have:
__print_symbolic(foo, FOO_GO, "go", FOO_START, "start",
FOO_END, "end")
If none of the enums are known to pevent, then eval_flag() will return
zero, and it will match it to the first item in the list, which would be
FOO_GO, which is not zero.
Luckily, in most cases, the first element would be zero, and the parsing
would match out of sheer luck.
Reported-by: Guilherme Cox <cox@computer.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20150324145813.0bfe95ba@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| Build | ||
| event-parse.c | ||
| event-parse.h | ||
| event-plugin.c | ||
| event-utils.h | ||
| kbuffer-parse.c | ||
| kbuffer.h | ||
| Makefile | ||
| parse-filter.c | ||
| parse-utils.c | ||
| plugin_cfg80211.c | ||
| plugin_function.c | ||
| plugin_hrtimer.c | ||
| plugin_jbd2.c | ||
| plugin_kmem.c | ||
| plugin_kvm.c | ||
| plugin_mac80211.c | ||
| plugin_sched_switch.c | ||
| plugin_scsi.c | ||
| plugin_xen.c | ||
| trace-seq.c | ||