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]
Message-ID: <YLolQAIq3tpC4LTL@kernel.org>
Date:   Fri, 4 Jun 2021 10:06:08 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Namhyung Kim <namhyung@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        Jin Yao <yao.jin@...ux.intel.com>
Subject: Re: [PATCH 1/3] perf stat: Check return value of asprintf() properly

Em Thu, Jun 03, 2021 at 09:47:58PM -0700, Ian Rogers escreveu:
> On Wed, Jun 2, 2021 at 2:22 PM Namhyung Kim <namhyung@...nel.org> wrote:
> >
> > It returns -1 on error, so checking with 0 would not work.
> >
> > Fixes: 12279429d862 ("perf stat: Uniquify hybrid event name")
> > Cc: Jin Yao <yao.jin@...ux.intel.com>
> > Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> 
> Acked-by: Ian Rogers <irogers@...gle.com>

Thanks, applied both.

- Arnaldo

 
> Thanks,
> Ian
> 
> > ---
> >  tools/perf/util/stat-display.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
> > index b759dfd633b4..04afd41b6067 100644
> > --- a/tools/perf/util/stat-display.c
> > +++ b/tools/perf/util/stat-display.c
> > @@ -564,7 +564,7 @@ static void uniquify_event_name(struct evsel *counter)
> >                                        counter->name, counter->pmu_name);
> >                 }
> >
> > -               if (ret) {
> > +               if (ret > 0) {
> >                         free(counter->name);
> >                         counter->name = new_name;
> >                 }
> > --
> > 2.32.0.rc0.204.g9fa02ecfa5-goog
> >

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ