mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] dso__data asan and test fixes
@ 2025-03-18  4:31 Ian Rogers
  2025-03-18  4:31 ` [PATCH v2 1/3] perf mutex: Add annotations for LOCKS_EXCLUDED and LOCKS_RETURNED Ian Rogers
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ian Rogers @ 2025-03-18  4:31 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, Athira Rajeev,
	Stephen Brennan, James Clark, Yunseong Kim, linux-perf-users,
	linux-kernel

The dso__data logic could deadlock with itself when build with asan or
reference count checking due to trying to recurively take a
non-recursive mutex. Use clang's thread safety analysis to find/fix
the problem. Running the tests would fail with -F no-fork mode as a
file descriptor wasn't cleaned up.

v2: Remove an unnecessary if as suggested by Namhyung.

Ian Rogers (3):
  perf mutex: Add annotations for LOCKS_EXCLUDED and LOCKS_RETURNED
  perf dso: Use lock annotations to fix asan deadlock
  perf test dso-data: Correctly free test file in read test

 tools/perf/tests/dso-data.c              | 28 ++++-----
 tools/perf/util/dso.c                    | 74 +++++++++++++++---------
 tools/perf/util/dso.h                    | 15 +++--
 tools/perf/util/mutex.h                  |  8 +++
 tools/perf/util/unwind-libunwind-local.c | 16 ++---
 5 files changed, 86 insertions(+), 55 deletions(-)

-- 
2.49.0.rc1.451.g8f38331e32-goog


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-03-18 18:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-18  4:31 [PATCH v2 0/3] dso__data asan and test fixes Ian Rogers
2025-03-18  4:31 ` [PATCH v2 1/3] perf mutex: Add annotations for LOCKS_EXCLUDED and LOCKS_RETURNED Ian Rogers
2025-03-18  4:31 ` [PATCH v2 2/3] perf dso: Use lock annotations to fix asan deadlock Ian Rogers
2025-03-18  4:31 ` [PATCH v2 3/3] perf test dso-data: Correctly free test file in read test Ian Rogers
2025-03-18 18:02 ` [PATCH v2 0/3] dso__data asan and test fixes Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®