From: Ian Rogers <irogers@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Kan Liang <kan.liang@linux.intel.com>,
Athira Rajeev <atrajeev@linux.vnet.ibm.com>,
Stephen Brennan <stephen.s.brennan@oracle.com>,
James Clark <james.clark@linaro.org>,
Yunseong Kim <yskelg@gmail.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/3] dso__data asan and test fixes
Date: Mon, 17 Mar 2025 21:31:48 -0700 [thread overview]
Message-ID: <20250318043151.137973-1-irogers@google.com> (raw)
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
next reply other threads:[~2025-03-18 4:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 4:31 Ian Rogers [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250318043151.137973-1-irogers@google.com \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=atrajeev@linux.vnet.ibm.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=stephen.s.brennan@oracle.com \
--cc=yskelg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®