]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf cpumap: Increment reference count for online cpumap
authorIan Rogers <irogers@google.com>
Tue, 18 Mar 2025 17:19:14 +0000 (10:19 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 19 Mar 2025 23:56:33 +0000 (16:56 -0700)
commit58b8b5d142a8bd5cee3f5181b9d9088051a53a04
treef5c603fe2071560d3f2ffddbb0489783b0e1b380
parentebf0b332732dcc64239119e554faa946562b0b93
perf cpumap: Increment reference count for online cpumap

Thomas Richter <tmricht@linux.ibm.com> reported a double put on the
cpumap for the placeholder core PMU:
https://lore.kernel.org/lkml/20250318095132.1502654-3-tmricht@linux.ibm.com/
Requiring the caller to get the cpumap is not how these things are
usually done, switch cpu_map__online to do the get and then fix up any
use cases where a put is needed.

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Thomas Richter <tmricht@linux.ibm.com>
Link: https://lore.kernel.org/r/20250318171914.145616-1-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/arch/arm/util/pmu.c
tools/perf/util/cpumap.c
tools/perf/util/evlist.c
tools/perf/util/mem-events.c
tools/perf/util/mmap.c
tools/perf/util/pmu.c
tools/perf/util/tool_pmu.c