linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Kim Phillips <kim.phillips@arm.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Dongjiu Geng <gengdongjiu@huawei.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 30/35] perf arm spe: Fix uninitialized record error variable
Date: Wed, 15 Aug 2018 12:06:06 -0300	[thread overview]
Message-ID: <20180815150611.32080-31-acme@kernel.org> (raw)
In-Reply-To: <20180815150611.32080-1-acme@kernel.org>

From: Kim Phillips <kim.phillips@arm.com>

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: ffd3d18c20b8 ("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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
index 1120e39c1b00..5ccfce87e693 100644
--- a/tools/perf/arch/arm64/util/arm-spe.c
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -194,6 +194,7 @@ struct auxtrace_record *arm_spe_recording_init(int *err,
 	sper->itr.read_finish = arm_spe_read_finish;
 	sper->itr.alignment = 0;
 
+	*err = 0;
 	return &sper->itr;
 }
 
-- 
2.14.4


  parent reply	other threads:[~2018-08-15 15:08 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-15 15:05 [GIT PULL 00/35] perf/core improvements and fixes Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 01/35] perf probe powerpc: Fix trace event post-processing Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 02/35] tools lib traceevent, perf tools: Rename struct pevent to struct tep_handle Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 03/35] tools lib traceevent, perf tools: Rename 'struct pevent_record' to 'struct tep_record' Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 04/35] tools lib traceevent, perf tools: Rename pevent plugin related APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 05/35] tools lib traceevent, perf tools: Rename pevent alloc / free APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 06/35] tools lib traceevent, perf tools: Rename pevent find APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 07/35] tools lib traceevent, perf tools: Rename pevent parse APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 08/35] tools lib traceevent, perf tools: Rename pevent print APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 09/35] tools lib traceevent, perf tools: Rename pevent_read_number_* APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 10/35] tools lib traceevent, perf tools: Rename pevent_register_* APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 11/35] tools lib traceevent, perf tools: Rename pevent_set_* APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 12/35] tools lib traceevent, perf tools: Rename traceevent_* APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 13/35] tools lib traceevent, perf tools: Rename 'enum pevent_flag' to 'enum tep_flag' Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 14/35] tools lib traceevent, tools lib lockdep: Rename 'enum pevent_errno' to 'enum tep_errno' Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 15/35] tools lib traceevent: Rename pevent_function* APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 16/35] tools lib traceevent, perf tools: Rename traceevent_plugin_* APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 17/35] tools lib traceevent: Rename pevent_filter* APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 18/35] tools lib traceevent: Rename pevent_register / unregister APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 19/35] tools lib traceevent: Rename pevent_data_ APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 20/35] tools lib traceevent: Rename pevent field APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 21/35] tools lib traceevent: Rename pevent_find_* APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 22/35] tools lib traceevent: Rename various pevent get/set/is APIs Arnaldo Carvalho de Melo
2018-08-15 15:05 ` [PATCH 23/35] tools lib traceevent: Rename internal parser related APIs Arnaldo Carvalho de Melo
2018-08-15 15:06 ` [PATCH 24/35] tools lib traceevent: Rename various pevent APIs Arnaldo Carvalho de Melo
2018-08-15 15:06 ` [PATCH 25/35] tools lib traceevent: Rename static variables and functions in event-parse.c Arnaldo Carvalho de Melo
2018-08-15 15:06 ` [PATCH 26/35] perf tools: Check for null when copying nsinfo Arnaldo Carvalho de Melo
2018-08-15 15:06 ` [PATCH 27/35] perf tools: Fix check-headers.sh AND list path of execution Arnaldo Carvalho de Melo
2018-08-15 15:06 ` [PATCH 28/35] perf tools: Make check-headers.sh check based on kernel dir Arnaldo Carvalho de Melo
2018-08-15 15:06 ` [PATCH 29/35] perf tools: Move syscall_64.tbl check into check-headers.sh Arnaldo Carvalho de Melo
2018-08-15 15:06 ` Arnaldo Carvalho de Melo [this message]
2018-08-15 15:06 ` [PATCH 31/35] perf python: Remove -mcet and -fcf-protection when building with clang Arnaldo Carvalho de Melo
2018-08-15 15:06 ` [PATCH 32/35] perf auxtrace: Fix queue resize Arnaldo Carvalho de Melo
2018-08-15 15:06 ` [PATCH 33/35] kallsyms: Simplify update_iter_mod() Arnaldo Carvalho de Melo
2018-08-15 15:06 ` [PATCH 34/35] kallsyms, x86: Export addresses of PTI entry trampolines Arnaldo Carvalho de Melo
2018-08-15 15:06 ` [PATCH 35/35] x86: Add entry trampolines to kcore Arnaldo Carvalho de Melo
2018-08-15 15:21 ` [GIT PULL 00/35] perf/core improvements and fixes Andy Lutomirski
2018-08-18 11:17 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180815150611.32080-31-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=gengdongjiu@huawei.com \
    --cc=jolsa@redhat.com \
    --cc=kim.phillips@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).