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: 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-01-25 15:27:48 -08:00
..
2022-01-12 17:01:38 -08:00
2022-06-28 12:05:25 -03:00
2022-10-04 08:55:21 -03:00
2022-10-04 08:55:21 -03:00
2022-10-04 08:55:22 -03:00
2022-10-04 08:55:22 -03:00
2021-09-03 08:15:10 -03:00
2021-04-29 10:30:58 -03:00
2021-08-11 09:35:44 -03:00
2022-10-04 08:55:20 -03:00
2022-06-23 11:54:22 -03:00
2022-10-04 08:55:22 -03:00
2022-10-04 08:55:22 -03:00
2022-10-06 08:03:52 -03:00
2022-10-04 08:55:22 -03:00
2021-11-07 12:27:38 -03:00
2021-02-03 13:10:44 -03:00
2022-07-26 16:31:54 -03:00
2021-07-15 17:30:22 -03:00
2022-02-14 16:56:32 -03:00
2022-10-04 08:55:22 -03:00
2021-11-07 12:27:38 -03:00
2022-10-04 08:55:21 -03:00
2022-10-04 08:55:22 -03:00
2022-10-04 08:55:22 -03:00
2022-10-04 08:55:22 -03:00
2020-10-14 13:34:26 -03:00
2021-02-17 15:15:06 -03:00
2022-10-04 08:55:23 -03:00
2022-06-23 11:54:22 -03:00
2022-10-04 08:55:20 -03:00