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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d615e7a0-8a7e-7e24-6c87-a8bf034ecb53@redhat.com>
Date:   Wed, 29 Jun 2022 19:24:32 -0700
From:   Tom Rix <trix@...hat.com>
To:     Zheng Yejian <zhengyejian1@...wei.com>, rostedt@...dmis.org,
        mingo@...hat.com, linux-kernel@...r.kernel.org,
        tom.zanussi@...ux.intel.com
Cc:     stable@...r.kernel.org, zhangjinhao2@...wei.com
Subject: Re: [PATCH] tracing/histograms: Simplify create_hist_fields()


On 6/29/22 6:31 PM, Zheng Yejian wrote:
> When I look into implements of create_hist_fields(), I think there can be
> following two simplifications:
>    1. If something wrong happened in parse_var_defs(), free_var_defs() would
>       have been called in it, so no need goto free again after calling it;
>    2. After calling create_key_fields(), regardless of the value of 'ret', it
>       then always runs into 'out: ', so the judge of 'ret' is redundant.
>
> No functional changes.
>
> Signed-off-by: Zheng Yejian <zhengyejian1@...wei.com>
> ---
>   kernel/trace/trace_events_hist.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
> index 2784951e0fc8..832c4ccf41ab 100644
> --- a/kernel/trace/trace_events_hist.c
> +++ b/kernel/trace/trace_events_hist.c
> @@ -4454,7 +4454,7 @@ static int create_hist_fields(struct hist_trigger_data *hist_data,
>   
>   	ret = parse_var_defs(hist_data);
>   	if (ret)
> -		goto out;
> +		return ret;
>   
>   	ret = create_val_fields(hist_data, file);
>   	if (ret)
> @@ -4465,8 +4465,7 @@ static int create_hist_fields(struct hist_trigger_data *hist_data,
>   		goto out;
>   
>   	ret = create_key_fields(hist_data, file);
> -	if (ret)
> -		goto out;
> +
>    out:
>   	free_var_defs(hist_data);
Reviewed-by: Tom Rix <trix@...hat.com>
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ