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]
Date:   Thu, 6 Jan 2022 09:47:58 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Lukas Bulwahn <lukas.bulwahn@...il.com>,
        Ingo Molnar <mingo@...hat.com>,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
        Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH] trace: remove unneeded initialization in
 __trace_uprobe_create()

On Wed, 5 Jan 2022 18:57:15 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:

> Masami, want to ack this?
> 
> -- Steve
> 
> 
> On Mon, 27 Dec 2021 13:53:08 +0100
> Lukas Bulwahn <lukas.bulwahn@...il.com> wrote:
> 
> > There is no need to initialize ret with 0, as all the early error branches
> > simply return constant values, and the default path always reaches
> > ret = kern_path(filename, LOOKUP_FOLLOW, &path), which will reset ret
> > before the initial value was ever used.
> > 
> > Remove this unneeded initialization and keep the code succinct.

Thanks, this looks good to me.

Acked-by: Masami Hiramatsu <mhiramat@...nel.org>

Regards,

> > 
> > Signed-off-by: Lukas Bulwahn <lukas.bulwahn@...il.com>
> > ---
> >  kernel/trace/trace_uprobe.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
> > index 5921951a0d5c..9da10c5efdce 100644
> > --- a/kernel/trace/trace_uprobe.c
> > +++ b/kernel/trace/trace_uprobe.c
> > @@ -548,7 +548,6 @@ static int __trace_uprobe_create(int argc, const char **argv)
> >  	bool is_return = false;
> >  	int i, ret;
> >  
> > -	ret = 0;
> >  	ref_ctr_offset = 0;
> >  
> >  	switch (argv[0][0]) {
> 


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ