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]
Message-ID: <55f62ee9-9e98-f5e0-67eb-fc7aa5cbe8f8@schaufler-ca.com>
Date:   Tue, 17 Jan 2017 09:53:27 -0800
From:   Casey Schaufler <casey@...aufler-ca.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>,
        linux-security-module@...r.kernel.org, selinux@...ho.nsa.gov
Cc:     Eric Paris <eparis@...isplace.org>,
        James Morris <james.l.morris@...cle.com>,
        Paul Moore <paul@...l-moore.com>,
        "Serge E. Hallyn" <serge@...lyn.com>,
        Stephen Smalley <sds@...ho.nsa.gov>,
        William Roberts <william.c.roberts@...el.com>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 15/46] selinux: One check and function call less in
 genfs_read() after error detection

On 1/17/2017 8:37 AM, SF Markus Elfring wrote:
>>> @@ -2015,7 +2015,7 @@ static int genfs_read(struct policydb *p, void *fp)
>>>  		newgenfs = kzalloc(sizeof(*newgenfs), GFP_KERNEL);
>>>  		if (!newgenfs) {
>>>  			rc = -ENOMEM;
>>> -			goto out;
>>> +			goto exit;
>>>  		}
>>>  
>>>  		rc = str_read(&newgenfs->fstype, GFP_KERNEL, fp, len);
>>> @@ -2101,7 +2101,7 @@ static int genfs_read(struct policydb *p, void *fp)
>>>  		kfree(newgenfs);
>>>  	}
>>>  	ocontext_destroy(newc, OCON_FSUSE);
>>> -
>>> +exit:
>>>  	return rc;
>> Why not replace the "goto out" with "return rc" rather
>> than add a target?
> Would you accept to use the statement "return -ENOMEM;" there instead?

That would be even better.

>
> Regards,
> Markus
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ