[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZuM9zc71XXXZ3eRZ@x1>
Date: Thu, 12 Sep 2024 16:15:25 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] perf vdso: Missed put on 32-bit dsos
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@...gle.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
Powered by blists - more mailing lists