lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 24 Oct 2017 03:16:40 -0700
From:   tip-bot for Christophe JAILLET <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, mingo@...nel.org,
        christophe.jaillet@...adoo.fr, hpa@...or.com, peterz@...radead.org,
        acme@...hat.com, tglx@...utronix.de,
        alexander.shishkin@...ux.intel.com
Subject: [tip:perf/core] perf kmem: Perform some cleanup if '--time' is
 given an invalid value

Commit-ID:  79f56ebe2ae33aa54c69bbc9854a9a31f622913e
Gitweb:     https://git.kernel.org/tip/79f56ebe2ae33aa54c69bbc9854a9a31f622913e
Author:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
AuthorDate: Sat, 16 Sep 2017 08:09:36 +0200
Committer:  Arnaldo Carvalho de Melo <acme@...hat.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@...adoo.fr>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: kernel-janitors@...r.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@...hat.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")) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ