Re: [PATCH 15/46] selinux: One check and function call less in genfs_read() after error detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
>

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux