diff options
author | Wang Nan <[email protected]> | 2015-04-28 08:46:09 +0000 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2015-05-05 12:26:52 -0300 |
commit | e59d29e88f7b7e3d1231202b0203d0af6f15a440 (patch) | |
tree | af3d9b41b9d35e87d6698c000f49400d3516b75e /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | e944ec2ca00fb0170ba9d7f2aeec32c22dc0d4ec (diff) |
perf probe: Fix segfault if passed with ''.
Since parse_perf_probe_point() deals with a user passed argument, we
should not assume it to be a valid string.
Without this patch, if pass '' to perf probe, a segfault raises:
$ perf probe -a ''
Segmentation fault
This patch checks argument of parse_perf_probe_point() before
string processing.
After this patch:
$ perf probe -a ''
usage: perf probe [<options>] 'PROBEDEF' ['PROBEDEF' ...]
or: perf probe [<options>] --add 'PROBEDEF' [--add 'PROBEDEF' ...]
...
Signed-off-by: Wang Nan <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Zefan Li <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions