path: root/tools/include
diff options
authorWang Nan <>2015-11-06 09:50:15 +0000
committerArnaldo Carvalho de Melo <>2015-11-11 18:41:32 -0300
commit421fd0845eaeecce6b3806f7f0c0d67d1f9ad108 (patch)
treeaaacfa9c48bec1daa5b0fb8c8809d0d74333a2c0 /tools/include
parente87b49116dedba3464fd8d0ec9393b4841167334 (diff)
perf probe: Verify parameters in two functions
On kernel with only one out of CONFIG_KPROBE_EVENTS and CONFIG_UPROBE_EVENTS enabled, 'perf probe -d' causes a segfault because perf_del_probe_events() calls probe_file__get_events() with a negative fd. This patch fixes it by adding parameter validation at the entry of probe_file__get_events() and probe_file__get_rawlist(). Since they are both non-static public functions (in .h file), parameter verifying is required. v1 -> v2: Verify fd at the head of probe_file__get_rawlist() instead of checking at call site (suggested by Masami and Arnaldo at [1,2]). [1] [2] Signed-off-by: Wang Nan <> Acked-by: Masami Hiramatsu <> Cc: Jiri Olsa <> Cc: Namhyung Kim <> Cc: Zefan Li <> Cc: Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/include')
0 files changed, 0 insertions, 0 deletions