diff options
author | Jackie Liu <jackieliu2113@gmail.com> | 2021-03-16 02:24:53 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-03-16 14:01:44 +0100 |
commit | 1a096ae46e21b73f83a581e617f76326c1de592d (patch) | |
tree | cd4a31171223f24b643605bb7fc2194d86ea8b27 /tools/perf/builtin-daemon.c | |
parent | perf pmu: Validate raw event with sysfs exported format bits (diff) | |
download | linux-1a096ae46e21b73f83a581e617f76326c1de592d.tar.xz linux-1a096ae46e21b73f83a581e617f76326c1de592d.zip |
perf top: Fix BPF support related crash with perf_event_paranoid=3 + kptr_restrict
After installing the libelf-dev package and compiling perf, if we have
kptr_restrict=2 and perf_event_paranoid=3 'perf top' will crash because
the value of /proc/kallsyms cannot be obtained, which leads to
info->jited_ksyms == NULL. In order to solve this problem, Add a
check before use.
Also plug some leaks on the error path.
Suggested-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: jackie liu <liuyun01@kylinos.cn>
Link: http://lore.kernel.org/lkml/20210316012453.1156-1-liuyun01@kylinos.cn
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-daemon.c')
0 files changed, 0 insertions, 0 deletions