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

2017-03-23 Thread Paul Moore
On Tue, Jan 17, 2017 at 12:53 PM, Casey Schaufler wrote: > 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

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

2017-03-23 Thread Paul Moore
On Tue, Jan 17, 2017 at 12:53 PM, Casey Schaufler wrote: > 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) {

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

2017-01-17 Thread Casey Schaufler
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;

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

2017-01-17 Thread Casey Schaufler
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;

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

2017-01-17 Thread SF Markus Elfring
>> @@ -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; >>

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

2017-01-17 Thread SF Markus Elfring
>> @@ -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; >>

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

2017-01-17 Thread Casey Schaufler
On 1/15/2017 7:15 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 14 Jan 2017 18:29:20 +0100 > > Adjust a jump target to avoid a check repetition at the end after a memory > allocation failed for the local variable "newgenfs". > > Signed-off-by:

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

2017-01-17 Thread Casey Schaufler
On 1/15/2017 7:15 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 14 Jan 2017 18:29:20 +0100 > > Adjust a jump target to avoid a check repetition at the end after a memory > allocation failed for the local variable "newgenfs". > > Signed-off-by: Markus Elfring > --- >

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

2017-01-15 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 14 Jan 2017 18:29:20 +0100 Adjust a jump target to avoid a check repetition at the end after a memory allocation failed for the local variable "newgenfs". Signed-off-by: Markus Elfring ---

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

2017-01-15 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 14 Jan 2017 18:29:20 +0100 Adjust a jump target to avoid a check repetition at the end after a memory allocation failed for the local variable "newgenfs". Signed-off-by: Markus Elfring --- security/selinux/ss/policydb.c | 4 ++-- 1 file changed, 2