perf parse-events: Avoid an uninitialized read when using fake PMUs
authorIan Rogers <irogers@google.com>
Wed, 26 Aug 2020 04:29:10 +0000 (21:29 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 1 Sep 2020 15:15:52 +0000 (12:15 -0300)
commit33321a06c70b44dd391b4cc01568a20d53fb3a6e
tree556bc58c6c9de17d6f49780874de4adea09c3be7
parent313146a844182c4829acd5e1d60246367212088f
perf parse-events: Avoid an uninitialized read when using fake PMUs

With a fake_pmu the pmu_info isn't populated by perf_pmu__check_alias.
In this case, don't try to copy the uninitialized values to the evsel.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200826042910.1902374-2-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/parse-events.c