From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Tue, 17 Jan 2017 16:37:41 +0000 Subject: Re: [PATCH 15/46] selinux: One check and function call less in genfs_read() after error detection Message-Id: <60ed4f02-4ff8-2ef2-bcc3-ae62bc61cda9@users.sourceforge.net> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Casey Schaufler , linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov Cc: Eric Paris , James Morris , Paul Moore , "Serge E. Hallyn" , Stephen Smalley , William Roberts , LKML , kernel-janitors@vger.kernel.org >> @@ -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