Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1560791
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 15/46] selinux: One check and function call less in genfs_read() after error detection |
| Date | 2017-01-17 17:40 +0100 |
| Message-ID | <t0EXF-VQ-47@gated-at.bofh.it> (permalink) |
| References | <sZUrL-3Jh-9@gated-at.bofh.it> <sZUL8-44S-33@gated-at.bofh.it> <t0EXE-VQ-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
>> @@ -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?
Regards,
Markus
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 15/46] selinux: One check and function call less in genfs_read() after error detection Casey Schaufler <casey@schaufler-ca.com> - 2017-01-17 17:40 +0100
Re: [PATCH 15/46] selinux: One check and function call less in genfs_read() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-17 17:40 +0100
Re: [PATCH 15/46] selinux: One check and function call less in genfs_read() after error detection Casey Schaufler <casey@schaufler-ca.com> - 2017-01-17 19:00 +0100
csiph-web