aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/avc.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/avc.c')
-rw-r--r--security/selinux/avc.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index 4b4293194aee..2380b8d72cec 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Implementation of the kernel access vector cache (AVC). 2 * Implementation of the kernel access vector cache (AVC).
3 * 3 *
4 * Authors: Stephen Smalley, <sds@epoch.ncsc.mil> 4 * Authors: Stephen Smalley, <sds@tycho.nsa.gov>
5 * James Morris <jmorris@redhat.com> 5 * James Morris <jmorris@redhat.com>
6 * 6 *
7 * Update: KaiGai, Kohei <kaigai@ak.jp.nec.com> 7 * Update: KaiGai, Kohei <kaigai@ak.jp.nec.com>
@@ -346,27 +346,26 @@ static struct avc_xperms_decision_node
346 struct avc_xperms_decision_node *xpd_node; 346 struct avc_xperms_decision_node *xpd_node;
347 struct extended_perms_decision *xpd; 347 struct extended_perms_decision *xpd;
348 348
349 xpd_node = kmem_cache_zalloc(avc_xperms_decision_cachep, 349 xpd_node = kmem_cache_zalloc(avc_xperms_decision_cachep, GFP_NOWAIT);
350 GFP_ATOMIC | __GFP_NOMEMALLOC);
351 if (!xpd_node) 350 if (!xpd_node)
352 return NULL; 351 return NULL;
353 352
354 xpd = &xpd_node->xpd; 353 xpd = &xpd_node->xpd;
355 if (which & XPERMS_ALLOWED) { 354 if (which & XPERMS_ALLOWED) {
356 xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep, 355 xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep,
357 GFP_ATOMIC | __GFP_NOMEMALLOC); 356 GFP_NOWAIT);
358 if (!xpd->allowed) 357 if (!xpd->allowed)
359 goto error; 358 goto error;
360 } 359 }
361 if (which & XPERMS_AUDITALLOW) { 360 if (which & XPERMS_AUDITALLOW) {
362 xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep, 361 xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep,
363 GFP_ATOMIC | __GFP_NOMEMALLOC); 362 GFP_NOWAIT);
364 if (!xpd->auditallow) 363 if (!xpd->auditallow)
365 goto error; 364 goto error;
366 } 365 }
367 if (which & XPERMS_DONTAUDIT) { 366 if (which & XPERMS_DONTAUDIT) {
368 xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep, 367 xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep,
369 GFP_ATOMIC | __GFP_NOMEMALLOC); 368 GFP_NOWAIT);
370 if (!xpd->dontaudit) 369 if (!xpd->dontaudit)
371 goto error; 370 goto error;
372 } 371 }
@@ -394,8 +393,7 @@ static struct avc_xperms_node *avc_xperms_alloc(void)
394{ 393{
395 struct avc_xperms_node *xp_node; 394 struct avc_xperms_node *xp_node;
396 395
397 xp_node = kmem_cache_zalloc(avc_xperms_cachep, 396 xp_node = kmem_cache_zalloc(avc_xperms_cachep, GFP_NOWAIT);
398 GFP_ATOMIC|__GFP_NOMEMALLOC);
399 if (!xp_node) 397 if (!xp_node)
400 return xp_node; 398 return xp_node;
401 INIT_LIST_HEAD(&xp_node->xpd_head); 399 INIT_LIST_HEAD(&xp_node->xpd_head);
@@ -548,7 +546,7 @@ static struct avc_node *avc_alloc_node(void)
548{ 546{
549 struct avc_node *node; 547 struct avc_node *node;
550 548
551 node = kmem_cache_zalloc(avc_node_cachep, GFP_ATOMIC|__GFP_NOMEMALLOC); 549 node = kmem_cache_zalloc(avc_node_cachep, GFP_NOWAIT);
552 if (!node) 550 if (!node)
553 goto out; 551 goto out;
554 552