* [PATCH 1/1] perf diff: fix error return value in __cmd_diff()
@ 2020-11-24 10:36 Zhen Lei
2020-11-27 8:40 ` Leizhen (ThunderTown)
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Zhen Lei @ 2020-11-24 10:36 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
linux-kernel
Cc: Zhen Lei
An appropriate return value should be set on the failed path.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
tools/perf/builtin-diff.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 584e2e1a3793..cefc71506409 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -1222,8 +1222,10 @@ static int __cmd_diff(void)
if (compute == COMPUTE_STREAM) {
d->evlist_streams = evlist__create_streams(
d->session->evlist, 5);
- if (!d->evlist_streams)
+ if (!d->evlist_streams) {
+ ret = -ENOMEM;
goto out_delete;
+ }
}
}
--
2.26.0.106.g9fadedd
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] perf diff: fix error return value in __cmd_diff()
2020-11-24 10:36 [PATCH 1/1] perf diff: fix error return value in __cmd_diff() Zhen Lei
@ 2020-11-27 8:40 ` Leizhen (ThunderTown)
2020-11-27 13:35 ` Namhyung Kim
2020-11-27 15:43 ` Jiri Olsa
2 siblings, 0 replies; 7+ messages in thread
From: Leizhen (ThunderTown) @ 2020-11-27 8:40 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
linux-kernel
Hi everybody:
Can any one review it?
On 2020/11/24 18:36, Zhen Lei wrote:
> An appropriate return value should be set on the failed path.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
> tools/perf/builtin-diff.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> index 584e2e1a3793..cefc71506409 100644
> --- a/tools/perf/builtin-diff.c
> +++ b/tools/perf/builtin-diff.c
> @@ -1222,8 +1222,10 @@ static int __cmd_diff(void)
> if (compute == COMPUTE_STREAM) {
> d->evlist_streams = evlist__create_streams(
> d->session->evlist, 5);
> - if (!d->evlist_streams)
> + if (!d->evlist_streams) {
> + ret = -ENOMEM;
> goto out_delete;
> + }
> }
> }
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] perf diff: fix error return value in __cmd_diff()
2020-11-24 10:36 [PATCH 1/1] perf diff: fix error return value in __cmd_diff() Zhen Lei
2020-11-27 8:40 ` Leizhen (ThunderTown)
@ 2020-11-27 13:35 ` Namhyung Kim
2020-11-27 17:22 ` Arnaldo Carvalho de Melo
2020-11-27 15:43 ` Jiri Olsa
2 siblings, 1 reply; 7+ messages in thread
From: Namhyung Kim @ 2020-11-27 13:35 UTC (permalink / raw)
To: Zhen Lei
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, linux-kernel
Hello,
On Tue, Nov 24, 2020 at 7:37 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>
> An appropriate return value should be set on the failed path.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Thanks,
Namhyung
> ---
> tools/perf/builtin-diff.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> index 584e2e1a3793..cefc71506409 100644
> --- a/tools/perf/builtin-diff.c
> +++ b/tools/perf/builtin-diff.c
> @@ -1222,8 +1222,10 @@ static int __cmd_diff(void)
> if (compute == COMPUTE_STREAM) {
> d->evlist_streams = evlist__create_streams(
> d->session->evlist, 5);
> - if (!d->evlist_streams)
> + if (!d->evlist_streams) {
> + ret = -ENOMEM;
> goto out_delete;
> + }
> }
> }
>
> --
> 2.26.0.106.g9fadedd
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] perf diff: fix error return value in __cmd_diff()
2020-11-24 10:36 [PATCH 1/1] perf diff: fix error return value in __cmd_diff() Zhen Lei
2020-11-27 8:40 ` Leizhen (ThunderTown)
2020-11-27 13:35 ` Namhyung Kim
@ 2020-11-27 15:43 ` Jiri Olsa
2 siblings, 0 replies; 7+ messages in thread
From: Jiri Olsa @ 2020-11-27 15:43 UTC (permalink / raw)
To: Zhen Lei
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Namhyung Kim, linux-kernel
On Tue, Nov 24, 2020 at 06:36:52PM +0800, Zhen Lei wrote:
> An appropriate return value should be set on the failed path.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
thanks,
jirka
> ---
> tools/perf/builtin-diff.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> index 584e2e1a3793..cefc71506409 100644
> --- a/tools/perf/builtin-diff.c
> +++ b/tools/perf/builtin-diff.c
> @@ -1222,8 +1222,10 @@ static int __cmd_diff(void)
> if (compute == COMPUTE_STREAM) {
> d->evlist_streams = evlist__create_streams(
> d->session->evlist, 5);
> - if (!d->evlist_streams)
> + if (!d->evlist_streams) {
> + ret = -ENOMEM;
> goto out_delete;
> + }
> }
> }
>
> --
> 2.26.0.106.g9fadedd
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] perf diff: fix error return value in __cmd_diff()
2020-11-27 13:35 ` Namhyung Kim
@ 2020-11-27 17:22 ` Arnaldo Carvalho de Melo
2020-11-27 17:25 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-11-27 17:22 UTC (permalink / raw)
To: Namhyung Kim
Cc: Zhen Lei, Peter Zijlstra, Ingo Molnar, Mark Rutland,
Alexander Shishkin, Jiri Olsa, linux-kernel
Em Fri, Nov 27, 2020 at 10:35:37PM +0900, Namhyung Kim escreveu:
> Hello,
>
> On Tue, Nov 24, 2020 at 7:37 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
> >
> > An appropriate return value should be set on the failed path.
> >
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>
Thanks, applied.
- Arnaldo
> Thanks,
> Namhyung
>
> > ---
> > tools/perf/builtin-diff.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> > index 584e2e1a3793..cefc71506409 100644
> > --- a/tools/perf/builtin-diff.c
> > +++ b/tools/perf/builtin-diff.c
> > @@ -1222,8 +1222,10 @@ static int __cmd_diff(void)
> > if (compute == COMPUTE_STREAM) {
> > d->evlist_streams = evlist__create_streams(
> > d->session->evlist, 5);
> > - if (!d->evlist_streams)
> > + if (!d->evlist_streams) {
> > + ret = -ENOMEM;
> > goto out_delete;
> > + }
> > }
> > }
> >
> > --
> > 2.26.0.106.g9fadedd
> >
> >
--
- Arnaldo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] perf diff: fix error return value in __cmd_diff()
2020-11-27 17:22 ` Arnaldo Carvalho de Melo
@ 2020-11-27 17:25 ` Arnaldo Carvalho de Melo
2020-11-28 1:15 ` Leizhen (ThunderTown)
0 siblings, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-11-27 17:25 UTC (permalink / raw)
To: Zhen Lei
Cc: Jin Yao, Namhyung Kim, Peter Zijlstra, Ingo Molnar, Mark Rutland,
Alexander Shishkin, Jiri Olsa, linux-kernel
Em Fri, Nov 27, 2020 at 02:22:02PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Nov 27, 2020 at 10:35:37PM +0900, Namhyung Kim escreveu:
> > On Tue, Nov 24, 2020 at 7:37 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
> > > An appropriate return value should be set on the failed path.
> > > Reported-by: Hulk Robot <hulkci@huawei.com>
> > > Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> > Acked-by: Namhyung Kim <namhyung@kernel.org>
> Thanks, applied.
I also added this:
Cc: Jin Yao <yao.jin@linux.intel.com>
Fixes: 2a09a84c720b436a ("perf diff: Support hot streams comparison")
Please add the fixes line and CC the author of the patch introducing the
bug next time,
Thanks
- Arnaldo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] perf diff: fix error return value in __cmd_diff()
2020-11-27 17:25 ` Arnaldo Carvalho de Melo
@ 2020-11-28 1:15 ` Leizhen (ThunderTown)
0 siblings, 0 replies; 7+ messages in thread
From: Leizhen (ThunderTown) @ 2020-11-28 1:15 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Jin Yao, Namhyung Kim, Peter Zijlstra, Ingo Molnar, Mark Rutland,
Alexander Shishkin, Jiri Olsa, linux-kernel
On 2020/11/28 1:25, Arnaldo Carvalho de Melo wrote:
> Em Fri, Nov 27, 2020 at 02:22:02PM -0300, Arnaldo Carvalho de Melo escreveu:
>> Em Fri, Nov 27, 2020 at 10:35:37PM +0900, Namhyung Kim escreveu:
>>> On Tue, Nov 24, 2020 at 7:37 PM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>
>>>> An appropriate return value should be set on the failed path.
>
>>>> Reported-by: Hulk Robot <hulkci@huawei.com>
>>>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>
>>> Acked-by: Namhyung Kim <namhyung@kernel.org>
>
>> Thanks, applied.
>
> I also added this:
>
> Cc: Jin Yao <yao.jin@linux.intel.com>
> Fixes: 2a09a84c720b436a ("perf diff: Support hot streams comparison")
>
> Please add the fixes line and CC the author of the patch introducing the
> bug next time,
Okay, I'll do that next time. Thanks for the heads-up.
>
> Thanks
>
> - Arnaldo
>
> .
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-11-28 1:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 10:36 [PATCH 1/1] perf diff: fix error return value in __cmd_diff() Zhen Lei
2020-11-27 8:40 ` Leizhen (ThunderTown)
2020-11-27 13:35 ` Namhyung Kim
2020-11-27 17:22 ` Arnaldo Carvalho de Melo
2020-11-27 17:25 ` Arnaldo Carvalho de Melo
2020-11-28 1:15 ` Leizhen (ThunderTown)
2020-11-27 15:43 ` Jiri Olsa
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).