From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Kan Liang <kan.liang@linux.intel.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] perf vdso: Missed put on 32-bit dsos
Date: Thu, 12 Sep 2024 16:15:25 -0300 [thread overview]
Message-ID: <ZuM9zc71XXXZ3eRZ@x1> (raw)
In-Reply-To: <20240912182757.762369-1-irogers@google.com>
On Thu, Sep 12, 2024 at 11:27:57AM -0700, Ian Rogers wrote:
> If the dso type doesn't match then NULL is returned but the dso should
> be put first.
I guess we can add:
Fixes: f649ed80f3cabbf1 ("perf dsos: Tidy reference counting and locking")
?
- Arnaldo
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/perf/util/vdso.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
> index 1b6f8f6db7aa..c12f5d8c4bf6 100644
> --- a/tools/perf/util/vdso.c
> +++ b/tools/perf/util/vdso.c
> @@ -308,8 +308,10 @@ static struct dso *machine__find_vdso(struct machine *machine,
> if (!dso) {
> dso = dsos__find(&machine->dsos, DSO__NAME_VDSO,
> true);
> - if (dso && dso_type != dso__type(dso, machine))
> + if (dso && dso_type != dso__type(dso, machine)) {
> + dso__put(dso);
> dso = NULL;
> + }
> }
> break;
> case DSO__TYPE_X32BIT:
> --
> 2.46.0.662.g92d0881bb0-goog
next prev parent reply other threads:[~2024-09-12 19:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 18:27 [PATCH v1] perf vdso: Missed put on 32-bit dsos Ian Rogers
2024-09-12 19:15 ` Arnaldo Carvalho de Melo [this message]
2024-09-12 19:31 ` Ian Rogers
2024-09-23 19:01 ` Ian Rogers
2024-09-23 23:24 ` Namhyung Kim
2024-09-27 18:39 ` Arnaldo Carvalho de Melo
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=ZuM9zc71XXXZ3eRZ@x1 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--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 \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.