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] [thread-next>] [day] [month] [year] [list]
Message-ID: <bb2db7bf-a1cb-c109-80f5-7e7be23c8b95@linux.intel.com>
Date:   Tue, 26 Sep 2023 12:36:35 -0400
From:   "Liang, Kan" <kan.liang@...ux.intel.com>
To:     weilin.wang@...el.com, Ian Rogers <irogers@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Adrian Hunter <adrian.hunter@...el.com>
Cc:     linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        Perry Taylor <perry.taylor@...el.com>,
        Samantha Alt <samantha.alt@...el.com>,
        Caleb Biggers <caleb.biggers@...el.com>,
        Mark Rutland <mark.rutland@....com>
Subject: Re: [RFC PATCH 23/25] perf stat: Fix a return error issue in
 hardware-grouping



On 2023-09-25 2:18 a.m., weilin.wang@...el.com wrote:
> From: Weilin Wang <weilin.wang@...el.com>
> 
> Update the hw_aware_parse_ids() goto to improve error handling.
> 

Seems like a bug fix. Please merge it with the patch which introduces
the issue.

Thanks,
Kan
> Signed-off-by: Weilin Wang <weilin.wang@...el.com>
> ---
>  tools/perf/util/metricgroup.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
> index 07a82fa21..6a4404226 100644
> --- a/tools/perf/util/metricgroup.c
> +++ b/tools/perf/util/metricgroup.c
> @@ -2196,11 +2196,11 @@ static int hw_aware_parse_ids(struct perf_pmu *fake_pmu,
>  	*out_evlist = NULL;
>  	ret = hw_aware_build_grouping(ids, &grouping);
>  	if (ret)
> -		goto err_out;
> +		goto out;
>  	ret = hw_aware_metricgroup__build_event_string(&grouping_str, modifier,
>  						      tool_events, &grouping);
>  	if (ret)
> -		goto err_out;
> +		goto out;
>  
>  	parsed_evlist = evlist__new();
>  	if (!parsed_evlist) {
> @@ -2225,10 +2225,11 @@ static int hw_aware_parse_ids(struct perf_pmu *fake_pmu,
>  	*out_evlist = parsed_evlist;
>  	parsed_evlist = NULL;
>  err_out:
> -	metricgroup__free_group_list(&grouping);
> -	metricgroup__free_grouping_strs(&grouping_str);
>  	parse_events_error__exit(&parse_error);
>  	evlist__delete(parsed_evlist);
> +out:
> +	metricgroup__free_group_list(&grouping);
> +	metricgroup__free_grouping_strs(&grouping_str);
>  	return ret;
>  }
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ