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]
Date:   Fri, 15 Oct 2021 11:15:14 +0200
From:   "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To:     gregkh@...uxfoundation.org, fabioaiuto83@...il.com,
        ross.schm.dev@...il.com, marcocesati@...il.com,
        saurav.girepunje@...il.com, insafonov@...il.com,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Saurav Girepunje <saurav.girepunje@...il.com>
Cc:     saurav.girepunje@...mail.com
Subject: Re: [PATCH v3] staging: rtl8723bs: os_dep: simplify the return statement

On Thursday, October 14, 2021 4:40:00 PM CEST Saurav Girepunje wrote:
> Remove goto statement where function simply return value without doing
> any cleanup action.
> 
> Simplify the return using goto label to avoid unneeded 'if' condition
> check.
> 
> Remove the unneeded and redundant check of variable on goto.
> 
> Remove the assignment of NULL on local variable.
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@...il.com>
> ---
> 
> ChangeLog V3:
> 
> 	-Remove goto statement where function simply return value
> 	 without doing any cleanup action.
> 	-Remove the assignment of NULL on local variable.
> 	-Replace the goto statement added after the memcpy on V2.
> 	 with return 0 statement.
> 
> ChangeLog V2:
> 
> 	-Add goto out after the memcpy for no error case return with
> 	 ret only. On V1 doing free, which was not required for no error
> 	 case.

You still don't explain why you changed v1. You had freed resources on 
success path. That was not allowed because you introduced a change in the 
logic and a huge bug. Therefore, in v2, you are not merely changing something 
that "was not required". Instead you are changing something that is not 
permitted.

Thanks,

Fabio



Powered by blists - more mailing lists