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: <20210626014047.GA15626@alison-desk.jf.intel.com>
Date:   Fri, 25 Jun 2021 18:40:47 -0700
From:   Alison Schofield <alison.schofield@...el.com>
To:     13145886936@....com
Cc:     dan.j.williams@...el.com, vishal.l.verma@...el.com,
        dave.jiang@...el.com, ira.weiny@...el.com, nvdimm@...ts.linux.dev,
        linux-kernel@...r.kernel.org, gushengxian <gushengxian@...ong.com>
Subject: Re: [PATCH] tools/testing/nvdimm: Remove NULL test before vfree

On Fri, Jun 25, 2021 at 06:26:55PM -0700, 13145886936@....com wrote:
> From: gushengxian <gushengxian@...ong.com>

Hi,

Thanks for updating the commit message and log.

I think you need to do something about the Signed-off-by or this
will not be accepted.  You can read more about the developer's
certificate of origin in here.
https://www.kernel.org/doc/html/latest/process/submitting-patches.html

Not sure your particular case, but maybe -

If you are submitting this on behalf of Gushengxian, then you need
to add your Signed-off-by after the current one:
ie. Signed-off-by: Your Full Name <13145886936@....com>

Or, if this is your work, then you may need to update your
.gitconfig file, like this:

[user]
	name = Your Full Name
	email = email@...mple.com

The From line of the email needs to match a Signed-off-by.

Each time you repost a patch please increment the version number.
The next posting would be [PATCH v3]

Alison

> 
> This NULL test is redundant since vfree() checks for NULL.
> Reported by Coccinelle.
> 
> Signed-off-by: gushengxian <gushengxian@...ong.com>
> ---
>  tools/testing/nvdimm/test/nfit.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
> index 54f367cbadae..cb86f0cbb11c 100644
> --- a/tools/testing/nvdimm/test/nfit.c
> +++ b/tools/testing/nvdimm/test/nfit.c
> @@ -1641,8 +1641,8 @@ static void *__test_alloc(struct nfit_test *t, size_t size, dma_addr_t *dma,
>   err:
>  	if (*dma && size >= DIMM_SIZE)
>  		gen_pool_free(nfit_pool, *dma, size);
> -	if (buf)
> -		vfree(buf);
> +
> +	vfree(buf);
>  	kfree(nfit_res);
>  	return NULL;
>  }
> -- 
> 2.25.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ