From: tip-bot for Thomas Richter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: brueckner@linux.vnet.ibm.com, tmricht@linux.ibm.com,
linux-kernel@vger.kernel.org, schwidefsky@de.ibm.com,
tglx@linutronix.de, heiko.carstens@de.ibm.com, mingo@kernel.org,
hpa@zytor.com, acme@redhat.com
Subject: [tip:perf/urgent] perf record: Fix s390 undefined record__auxtrace_init() return value
Date: Wed, 25 Apr 2018 22:55:43 -0700 [thread overview]
Message-ID: <tip-5d9946c3e5e38e07ab7019db9413a96807a325f2@git.kernel.org> (raw)
In-Reply-To: <20180423142940.21143-1-tmricht@linux.ibm.com>
Commit-ID: 5d9946c3e5e38e07ab7019db9413a96807a325f2
Gitweb: https://git.kernel.org/tip/5d9946c3e5e38e07ab7019db9413a96807a325f2
Author: Thomas Richter <tmricht@linux.ibm.com>
AuthorDate: Mon, 23 Apr 2018 16:29:40 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 23 Apr 2018 12:05:02 -0300
perf record: Fix s390 undefined record__auxtrace_init() return value
Command 'perf record' calls:
cmd_report()
record__auxtrace_init()
auxtrace_record__init()
On s390 function auxtrace_record__init() returns random return value due
to missing initialization.
This sometime causes 'perf record' to exit immediately without error
message and creating a perf.data file.
Fix this by setting error the return code to zero before returning from
platform specific functions which may not set the error code in call
cases.
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Link: http://lkml.kernel.org/r/20180423142940.21143-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/arch/s390/util/auxtrace.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/arch/s390/util/auxtrace.c b/tools/perf/arch/s390/util/auxtrace.c
index 6cb48e4cffd9..3afe8256eff2 100644
--- a/tools/perf/arch/s390/util/auxtrace.c
+++ b/tools/perf/arch/s390/util/auxtrace.c
@@ -87,6 +87,7 @@ struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
struct perf_evsel *pos;
int diagnose = 0;
+ *err = 0;
if (evlist->nr_entries == 0)
return NULL;
prev parent reply other threads:[~2018-04-26 5:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 14:29 [PATCH] perf record: Fix s390 random record__auxtrace_init " Thomas Richter
2018-04-26 5:55 ` tip-bot for Thomas Richter [this message]
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=tip-5d9946c3e5e38e07ab7019db9413a96807a325f2@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=brueckner@linux.vnet.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=tglx@linutronix.de \
--cc=tmricht@linux.ibm.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
Powered by JetHome