Skip to content

Commit 424aafb

Browse files
captain5050acmel
authored andcommitted
perf vdso: Missed put on 32-bit dsos
If the dso type doesn't match then NULL is returned but the dso should be put first. Fixes: f649ed8 ("perf dsos: Tidy reference counting and locking") Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20240912182757.762369-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 52c996d commit 424aafb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tools/perf/util/vdso.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,10 @@ static struct dso *machine__find_vdso(struct machine *machine,
308308
if (!dso) {
309309
dso = dsos__find(&machine->dsos, DSO__NAME_VDSO,
310310
true);
311-
if (dso && dso_type != dso__type(dso, machine))
311+
if (dso && dso_type != dso__type(dso, machine)) {
312+
dso__put(dso);
312313
dso = NULL;
314+
}
313315
}
314316
break;
315317
case DSO__TYPE_X32BIT:

0 commit comments

Comments
 (0)