]> git.baikalelectronics.ru Git - kernel.git/commit
perf arm spe: Fix uninitialized record error variable
authorKim Phillips <kim.phillips@arm.com>
Fri, 10 Aug 2018 22:45:12 +0000 (17:45 -0500)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 14 Aug 2018 18:10:44 +0000 (15:10 -0300)
commit94e5fbab39ed1b7d9e8eb8d2c906989dc7b8c860
tree08b1367b30884d98c2a0ab5e41bf658292c335ac
parent3f6305dc954c0132fb6f5fe93e9e585bade4e239
perf arm spe: Fix uninitialized record error variable

The auxtrace init variable 'err' was not being initialized, leading perf
to abort early in an SPE record command when there was no explicit
error, rather only based whatever memory contents were on the stack.
Initialize it explicitly on getting an SPE successfully, the same way
cs-etm does.

Signed-off-by: Kim Phillips <kim.phillips@arm.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Dongjiu Geng <gengdongjiu@huawei.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: 8ad61d1dc919 ("perf tools: Add ARM Statistical Profiling Extensions (SPE) support")
Link: http://lkml.kernel.org/r/20180810174512.52900813e57cbccf18ce99a2@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/arm64/util/arm-spe.c