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:   Thu, 2 Feb 2017 16:03:10 +0100
From:   Stanislaw Gruszka <sgruszka@...hat.com>
To:     "John W. Linville" <linville@...driver.com>
Cc:     netdev@...r.kernel.org, Ben Hutchings <ben@...adent.org.uk>
Subject: Re: [PATCH v2] ethtool: do not vzalloc(0) on registers dump

On Thu, Feb 02, 2017 at 09:27:18AM -0500, John W. Linville wrote:
> > -	regbuf = vzalloc(reglen);
> > -	if (reglen && !regbuf)
> > -		return -ENOMEM;
> > +	regbuf = NULL;
> 
> Any reason to prefer this over changing the declaration to include
> the assignment?
> 
> 	void *regbuf = NULL;

I've chosen this form to have initialization near the vzalloc() call,
after sanity checks, however I don't think it's better or worse over
declaration initialization.

Stanislaw

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ