Files
linux/tools/perf/util
Ian Rogers b72b8132d8 perf libbfd: Ensure libbfd is initialized prior to use
Multiple threads may be creating and destroying BFD objects in
situations like `perf top`.

Without appropriate initialization crashes may occur during libbfd's
cache management.

BFD's locks require recursive mutexes, add support for these.

Committer testing:

This happens only when building with 'make BUILD_NONDISTRO=1' and having
the binutils-devel package (or equivalent) installed, i.e. linking with
binutils devel files, an opt-in perf build.

Before:

  root@x1:~# perf top
  perf: Segmentation fault
  -------- backtrace --------
  <SNIP multiple failed attempts at printing a backtrace>
  root@x1:~#

After this patch it works as before.

Closes: https://lore.kernel.org/lkml/aQt66zhfxSA80xwt@gentoo.org/
Fixes: 95931d9a59 ("perf libbfd: Move libbfd functionality to its own file")
Reported-by: Guilherme Amadio <amadio@gentoo.org>
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2025-11-13 17:55:19 -03:00
..
2025-06-09 11:18:17 -07:00
2025-06-09 11:18:17 -07:00
2023-03-14 08:29:46 -03:00
2024-08-19 14:52:13 -03:00
2025-10-03 16:49:51 -03:00
2025-10-03 16:49:51 -03:00
2023-01-23 10:00:47 -03:00
2025-07-02 19:01:54 -07:00
2024-08-12 18:05:14 -03:00
2024-08-19 14:51:46 -03:00
2024-02-12 12:35:41 -08:00
2025-05-02 15:36:14 -03:00
2025-02-10 11:46:02 -08:00
2025-10-03 16:49:51 -03:00
2023-04-06 21:40:28 -03:00
2023-09-12 17:47:00 -03:00
2025-03-10 11:31:24 -07:00
2025-03-10 11:31:24 -07:00
2025-07-11 12:36:40 -07:00
2025-07-11 12:36:40 -07:00
2024-12-12 15:53:36 -03:00
2025-06-09 11:18:18 -07:00
2025-06-09 11:18:18 -07:00
2025-09-03 12:34:55 -03:00
2025-07-26 16:31:43 -07:00
2025-09-19 12:14:29 -03:00
2023-04-10 19:20:53 -03:00
2024-09-27 15:38:52 -03:00