acrn-kernel/tools/perf
Ian Rogers 16cbe4bad8 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: f8dfeae009 ("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-01-25 15:27:48 -08:00
..
Documentation perf kwork: Add the supported subcommands to the document 2023-11-20 11:52:09 +01:00
arch
bench
dlfilters
examples/bpf
include
jvmti
pmu-events perf vendor events: Drop STORES_PER_INST metric event for power10 platform 2023-09-19 12:28:00 +02:00
python
scripts
tests perf test shell stat_bpf_counters: Fix test on Intel 2023-09-19 12:28:07 +02:00
trace
ui perf hists browser: Fix the number of entries for 'e' key 2023-09-19 12:28:07 +02:00
util perf env: Avoid recursively taking env->bpf_progs.lock 2024-01-25 15:27:48 -08:00
.gitignore
Build
CREDITS
MANIFEST
Makefile
Makefile.config
Makefile.perf
builtin-annotate.c
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-c2c.c
builtin-config.c
builtin-daemon.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c
builtin-help.c
builtin-inject.c
builtin-kallsyms.c
builtin-kmem.c
builtin-kvm.c
builtin-kwork.c perf kwork: Set ordered_events to true in 'struct perf_tool' 2023-11-20 11:52:09 +01:00
builtin-list.c
builtin-lock.c
builtin-mem.c
builtin-probe.c
builtin-record.c
builtin-report.c
builtin-sched.c
builtin-script.c
builtin-stat.c perf stat: Fix aggr mode initialization 2023-11-20 11:52:09 +01:00
builtin-timechart.c
builtin-top.c perf top: Don't pass an ERR_PTR() directly to perf_session__delete() 2023-09-19 12:28:00 +02:00
builtin-trace.c
builtin-version.c
builtin.h
check-headers.sh
command-list.txt
design.txt
perf-archive.sh
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c
perf.h