selinux: stop flooding the log buffer

The avc allocations are marked with GFP_NOWAIT and thus
considered to be non-fatal allocations. This also makes
these allocations easy to fail thus filling the log buffer
with page allocation failure messages. There are no known
cases of these messages being of any importance for
debugging. Disable them.

Change-Id: I3517a134ad0e8deb307f0d140f4b16cb303a9f7f
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
Vinayak Menon 2018-05-17 14:34:41 +05:30 • committed by Isaac J. Manjarres
commit 44103384ae

View file

@ -294,26 +294,27 @@ static struct avc_xperms_decision_node
struct avc_xperms_decision_node *xpd_node;
struct extended_perms_decision *xpd;
xpd_node = kmem_cache_zalloc(avc_xperms_decision_cachep, GFP_NOWAIT);
xpd_node = kmem_cache_zalloc(avc_xperms_decision_cachep,
GFP_NOWAIT | __GFP_NOWARN);
if (!xpd_node)
return NULL;
xpd = &xpd_node->xpd;
if (which & XPERMS_ALLOWED) {
xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep,
GFP_NOWAIT);
GFP_NOWAIT | __GFP_NOWARN);
if (!xpd->allowed)
goto error;
}
if (which & XPERMS_AUDITALLOW) {
xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep,
GFP_NOWAIT);
GFP_NOWAIT | __GFP_NOWARN);
if (!xpd->auditallow)
goto error;
}
if (which & XPERMS_DONTAUDIT) {
xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep,
GFP_NOWAIT);
GFP_NOWAIT | __GFP_NOWARN);
if (!xpd->dontaudit)
goto error;
}
@ -341,7 +342,8 @@ static struct avc_xperms_node *avc_xperms_alloc(void)
{
struct avc_xperms_node *xp_node;
xp_node = kmem_cache_zalloc(avc_xperms_cachep, GFP_NOWAIT);
xp_node = kmem_cache_zalloc(avc_xperms_cachep,
GFP_NOWAIT | __GFP_NOWARN);
if (!xp_node)
return xp_node;
INIT_LIST_HEAD(&xp_node->xpd_head);
@ -497,7 +499,7 @@ static struct avc_node *avc_alloc_node(struct selinux_avc *avc)
{
struct avc_node *node;
node = kmem_cache_zalloc(avc_node_cachep, GFP_NOWAIT);
node = kmem_cache_zalloc(avc_node_cachep, GFP_NOWAIT | __GFP_NOWARN);
if (!node)
goto out;