perf pmu: Use perf_cpu_map__set_nr() in perf_pmu__cpus_match() to allow for refcnt checking
One more step to allow for checking reference counting, user after free, etc. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com> Cc: Dmitriy Vyukov <dvyukov@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Riccardo Mancini <rickyman7@gmail.com> Cc: Stephane Eranian <eranian@google.com> Cc: Stephen Brennan <stephen.s.brennan@oracle.com> Link: https://lore.kernel.org/ZDb9dycHQ11UIXwx@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
b277851417
commit
9efe423e43
@ -2020,8 +2020,8 @@ int perf_pmu__cpus_match(struct perf_pmu *pmu, struct perf_cpu_map *cpus,
|
||||
matched_cpus->map[matched_nr++] = cpu;
|
||||
}
|
||||
|
||||
unmatched_cpus->nr = unmatched_nr;
|
||||
matched_cpus->nr = matched_nr;
|
||||
perf_cpu_map__set_nr(unmatched_cpus, unmatched_nr);
|
||||
perf_cpu_map__set_nr(matched_cpus, matched_nr);
|
||||
*mcpus_ptr = matched_cpus;
|
||||
*ucpus_ptr = unmatched_cpus;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user