linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf kmem: Perform some cleanup if '--time' is given an invalid value
@ 2017-09-16  6:09 Christophe JAILLET
  2017-10-19 12:37 ` Arnaldo Carvalho de Melo
  2017-10-24 10:16 ` [tip:perf/core] " tip-bot for Christophe JAILLET
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2017-09-16  6:09 UTC (permalink / raw)
  To: peterz, mingo, acme, alexander.shishkin
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET

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.

Fixes: 2a865bd8dddd ("perf kmem: Add option to specify time window of interest")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 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 24ee68ecdd42..d8f25ef8157b 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")) {
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf kmem: Perform some cleanup if '--time' is given an invalid value
  2017-09-16  6:09 [PATCH] perf kmem: Perform some cleanup if '--time' is given an invalid value Christophe JAILLET
@ 2017-10-19 12:37 ` Arnaldo Carvalho de Melo
  2017-10-24 10:16 ` [tip:perf/core] " tip-bot for Christophe JAILLET
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-10-19 12:37 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: peterz, mingo, alexander.shishkin, linux-kernel, kernel-janitors

Em Sat, Sep 16, 2017 at 08:09:36AM +0200, Christophe JAILLET escreveu:
> 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.

Thanks, applied.

- Arnaldo
 
> Fixes: 2a865bd8dddd ("perf kmem: Add option to specify time window of interest")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  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 24ee68ecdd42..d8f25ef8157b 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")) {
> -- 
> 2.11.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/core] perf kmem: Perform some cleanup if '--time' is given an invalid value
  2017-09-16  6:09 [PATCH] perf kmem: Perform some cleanup if '--time' is given an invalid value Christophe JAILLET
  2017-10-19 12:37 ` Arnaldo Carvalho de Melo
@ 2017-10-24 10:16 ` tip-bot for Christophe JAILLET
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Christophe JAILLET @ 2017-10-24 10:16 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, mingo, christophe.jaillet, hpa, peterz, acme, tglx,
	alexander.shishkin

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")) {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-24 10:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-16  6:09 [PATCH] perf kmem: Perform some cleanup if '--time' is given an invalid value Christophe JAILLET
2017-10-19 12:37 ` Arnaldo Carvalho de Melo
2017-10-24 10:16 ` [tip:perf/core] " tip-bot for Christophe JAILLET

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).