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: <20191030092036.38cf4f11@xps13>
Date:   Wed, 30 Oct 2019 09:20:36 +0100
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Saurav Girepunje <saurav.girepunje@...il.com>
Cc:     joern@...ybastard.org, dwmw2@...radead.org,
        computersforpeace@...il.com, marek.vasut@...il.com, richard@....at,
        vigneshr@...com, linux-mtd@...ts.infradead.org,
        linux-kernel@...r.kernel.org, saurav.girepunje@...mail.com
Subject: Re: [PATCH v1] mtd: devices: phram.c: Fix multiple kfree statement
 from phram_setup

Saurav,

Saurav Girepunje <saurav.girepunje@...il.com> wrote on Tue, 29 Oct 2019
22:38:49 +0530:

Are you a robot?

> Remove multiple kfree statement from phram_setup() in phram.c

This does not describe what you are doing, you don't remove them you
factorize them. And honestly I am not convinced this change is useful
in old code.

> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@...il.com>
> ---
> 
> Change in v1:

Your first version is v1, how can you be at v1? It is almost v3 already!

> 
> - Add change suggested by Miquel Raynal <miquel.raynal@...tlin.com>
>   "The goto statement should not describe from where it is called but the
>    action it is supposed to take. 'goto free_nam;' would be better."

This is a copy/paste of what I have said. What I want you to write is:

"
- Rename the goto statement to describe bla bla bla.
- Fix the typo in the goto label.
"

> 
>  drivers/mtd/devices/phram.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
> index c467286ca007..38f95a1517ac 100644
> --- a/drivers/mtd/devices/phram.c
> +++ b/drivers/mtd/devices/phram.c
> @@ -243,22 +243,22 @@ static int phram_setup(const char *val)
>  
>  	ret = parse_num64(&start, token[1]);
>  	if (ret) {
> -		kfree(name);
>  		parse_err("illegal start address\n");
> +		goto free_nam;

Come one...


Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ