Files
erofs-linux/tools/perf/util
Wang Nan 421fd0845e 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] http://lkml.kernel.org/r/50399556C9727B4D88A595C8584AAB37526048E3@GSjpTKYDCembx32.service.hitachi.net
[2] http://lkml.kernel.org/r/[email protected]

Signed-off-by: Wang Nan <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Zefan Li <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2015-11-11 18:41:32 -03:00
..
…
…
…
2015-11-06 17:50:03 -03:00
2015-11-06 17:50:03 -03:00
2015-05-27 12:21:43 -03:00
…
…
…
2015-08-06 15:30:38 -03:00
2015-08-06 15:30:38 -03:00
2015-06-08 10:31:40 -03:00
…
…
2015-08-21 11:34:10 -03:00
…
…
…
2015-08-06 16:49:01 -03:00
…
…
2015-05-05 18:13:22 -03:00
2015-05-05 18:13:22 -03:00
…
…
…
…
2015-10-01 09:54:33 -03:00
2015-10-19 18:02:07 -03:00
…
…
…
…
…
…
…
2015-05-29 12:43:44 -03:00
…