Re: [PATCH] selinux: return -ENOMEM if kzalloc() fails

2017-07-05 Thread Paul Moore
On Fri, Jun 30, 2017 at 9:10 AM, Tetsuo Handa wrote: > Stephen Smalley wrote: >> On Fri, 2017-06-30 at 10:56 +0300, Dan Carpenter wrote: >> > We accidentally return success instead of -ENOMEM on this failure >> > path. >> > >> > Fixes: 409dcf31538a ("selinux: Add a cache for quicker retreival of >

Re: [PATCH] IB/core: Fix static analysis warning in ib_policy_change_task

2017-07-05 Thread Doug Ledford
On 7/1/2017 9:42 AM, Paul Moore wrote: > On Fri, Jun 30, 2017 at 11:15 AM, Dan Jurgens wrote: >> From: Daniel Jurgens >> >> ib_get_cached_subnet_prefix can technically fail, but the only way it >> could is not possible based on the loop conditions. Check the return >> value before using the varia

Re: [PATCH] IB/core: Fix static analysis warning in ib_policy_change_task

2017-07-05 Thread Leon Romanovsky
On Mon, Jul 03, 2017 at 07:03:54PM -0400, Paul Moore wrote: > On Fri, Jun 30, 2017 at 11:15 AM, Dan Jurgens wrote: > > From: Daniel Jurgens > > > > ib_get_cached_subnet_prefix can technically fail, but the only way it > > could is not possible based on the loop conditions. Check the return > > va

[PATCH v1 1/1] IB/core: Fix static analysis warning in ib_policy_change_task

2017-07-05 Thread Dan Jurgens
From: Daniel Jurgens ib_get_cached_subnet_prefix can technically fail, but the only way it could is not possible based on the loop conditions. Check the return value before using the variable sp to resolve a static analysis warning. Fixes: 8f408ab64be6 ("selinux lsm IB/core: Implement LSM notifi

Re: [PATCH] IB/core: Fix static analysis warning in ib_policy_change_task

2017-07-05 Thread Daniel Jurgens
On 7/3/2017 6:03 PM, Paul Moore wrote: > On Fri, Jun 30, 2017 at 11:15 AM, Dan Jurgens wrote: >> From: Daniel Jurgens >> >> ib_get_cached_subnet_prefix can technically fail, but the only way it >> could is not possible based on the loop conditions. Check the return >> value before using the varia

Re: [PATCH v1 1/1] IB/core: Fix static analysis warning in ib_policy_change_task

2017-07-05 Thread Paul Moore
On Wed, Jul 5, 2017 at 9:15 AM, Dan Jurgens wrote: > From: Daniel Jurgens > > ib_get_cached_subnet_prefix can technically fail, but the only way it > could is not possible based on the loop conditions. Check the return > value before using the variable sp to resolve a static analysis warning. > >