Commit 424aafb6 authored by Ian Rogers's avatar Ian Rogers Committed by Arnaldo Carvalho de Melo
Browse files

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: f649ed80 ("perf dsos: Tidy reference counting and locking")
Signed-off-by: default avatarIan Rogers <irogers@google.com>
Acked-by: default avatarNamhyung 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 52c996d3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -308,9 +308,11 @@ 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:
		dso = dsos__find(&machine->dsos, DSO__NAME_VDSOX32, true);