kernel_samsung_a53x/tools/perf
Ian Rogers d8c0a9818f perf env: Avoid recursively taking env->bpf_progs.lock
[ Upstream commit 9c51f8788b5d4e9f46afbcf563255cfd355690b3 ]

Add variants of perf_env__insert_bpf_prog_info(), perf_env__insert_btf()
and perf_env__find_btf prefixed with __ to indicate the
env->bpf_progs.lock is assumed held.

Call these variants when the lock is held to avoid recursively taking it
and potentially having a thread deadlock with itself.

Fixes: f8dfeae009effc0b ("perf bpf: Show more BPF program info in print_bpf_prog_info()")
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ming Wang <wangming01@loongson.cn>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Link: https://lore.kernel.org/r/20231207014655.1252484-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:12:50 +01:00
..
arch Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bench Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Documentation Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
examples/bpf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
include/bpf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jvmti Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmu-events Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
python Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scripts Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tests Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ui Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
util perf env: Avoid recursively taking env->bpf_progs.lock 2024-11-18 12:12:50 +01:00
Build Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-annotate.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-bench.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-buildid-cache.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-buildid-list.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-c2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-config.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-data.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-diff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-evlist.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-ftrace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-help.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-inject.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-kallsyms.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-kmem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-kvm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-list.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-lock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-mem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-probe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-record.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-report.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-sched.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-script.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-stat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-timechart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-top.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin-version.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
builtin.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
check-headers.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
command-list.txt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
CREDITS Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
design.txt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile.config Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile.perf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
MANIFEST Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf-archive.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf-completion.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf-read-vdso.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf-sys.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf-with-kcore.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00