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, 7 Dec 2017 11:49:42 +1100 (AEDT)
From:   James Morris <james.l.morris@...cle.com>
To:     Julia Lawall <julia.lawall@...6.fr>
cc:     David Howells <dhowells@...hat.com>,
        Colin King <colin.king@...onical.com>,
        "Serge E . Hallyn" <serge@...lyn.com>, keyrings@...r.kernel.org,
        linux-security-module@...r.kernel.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] security: keys: remove redundant assignment to key_ref

On Wed, 6 Dec 2017, Julia Lawall wrote:

> > There's a preference in Linux to use:
> >
> > 	key_ref = ERR_PTR(-error);
> >  	if (something)
> >  		goto error;
> >
> > instead because it uses less vertical space.  It might originally have been
> > promulgated by Linus, but I don't remember.  Though you do have a point - your
> > way makes error handling less subject breakage from code rearrangement.
> 
> I have the impression that there are many examples of both approaches.

I thought this was mainly to set a default error condition once and then 
some call during the function sets it to zero on success.


-- 
James Morris
<james.l.morris@...cle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ