From: tip-bot for Christophe JAILLET <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
christophe.jaillet@wanadoo.fr, hpa@zytor.com,
peterz@infradead.org, acme@redhat.com, tglx@linutronix.de,
alexander.shishkin@linux.intel.com
Subject: [tip:perf/core] perf kmem: Perform some cleanup if '--time' is given an invalid value
Date: Tue, 24 Oct 2017 03:16:40 -0700 [thread overview]
Message-ID: <tip-79f56ebe2ae33aa54c69bbc9854a9a31f622913e@git.kernel.org> (raw)
In-Reply-To: <20170916060936.28199-1-christophe.jaillet@wanadoo.fr>
Commit-ID: 79f56ebe2ae33aa54c69bbc9854a9a31f622913e
Gitweb: https://git.kernel.org/tip/79f56ebe2ae33aa54c69bbc9854a9a31f622913e
Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
AuthorDate: Sat, 16 Sep 2017 08:09:36 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 23 Oct 2017 16:30:53 -0300
perf kmem: Perform some cleanup if '--time' is given an invalid value
If the string passed in '--time' is invalid, we must do some cleanup
before leaving. As in the other error handling paths of this function.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: kernel-janitors@vger.kernel.org
Fixes: 2a865bd8dddd ("perf kmem: Add option to specify time window of interest")
Link: http://lkml.kernel.org/r/20170916060936.28199-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-kmem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 24ee68e..d8f25ef 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -1983,7 +1983,8 @@ int cmd_kmem(int argc, const char **argv)
if (perf_time__parse_str(&ptime, time_str) != 0) {
pr_err("Invalid time string\n");
- return -EINVAL;
+ ret = -EINVAL;
+ goto out_delete;
}
if (!strcmp(argv[0], "stat")) {
prev parent reply other threads:[~2017-10-24 10:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-16 6:09 [PATCH] " Christophe JAILLET
2017-10-19 12:37 ` Arnaldo Carvalho de Melo
2017-10-24 10:16 ` tip-bot for Christophe JAILLET [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-79f56ebe2ae33aa54c69bbc9854a9a31f622913e@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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