[PATCH -mmotm 12/30] selinux: tag avc cache alloc as non-critical

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Xiaotian Feng
Date: Tuesday, July 13, 2010 - 3:19 am

From 6c3a91091b2910c23908a9f9953efcf3df14e522 Mon Sep 17 00:00:00 2001
From: Xiaotian Feng <dfeng@redhat.com>
Date: Tue, 13 Jul 2010 11:02:41 +0800
Subject: [PATCH 12/30] selinux: tag avc cache alloc as non-critical

Failing to allocate a cache entry will only harm performance not correctness.
Do not consume valuable reserve pages for something like that.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
---
 security/selinux/avc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index 3662b0f..9029395 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -284,7 +284,7 @@ static struct avc_node *avc_alloc_node(void)
 {
 	struct avc_node *node;
 
-	node = kmem_cache_zalloc(avc_node_cachep, GFP_ATOMIC);
+	node = kmem_cache_zalloc(avc_node_cachep, GFP_ATOMIC|__GFP_NOMEMALLOC);
 	if (!node)
 		goto out;
 
-- 
1.7.1.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -mmotm 00/30] [RFC] swap over nfs -v21, Xiaotian Feng, (Tue Jul 13, 3:16 am)
[PATCH -mmotm 02/30] Swap over network documentation, Xiaotian Feng, (Tue Jul 13, 3:17 am)
[PATCH -mmotm 03/30] mm: expose gfp_to_alloc_flags(), Xiaotian Feng, (Tue Jul 13, 3:17 am)
[PATCH -mmotm 04/30] mm: tag reseve pages, Xiaotian Feng, (Tue Jul 13, 3:17 am)
[PATCH -mmotm 06/30] mm: kmem_alloc_estimate(), Xiaotian Feng, (Tue Jul 13, 3:17 am)
[PATCH -mmotm 08/30] mm: emergency pool, Xiaotian Feng, (Tue Jul 13, 3:18 am)
[PATCH -mmotm 09/30] mm: system wide ALLOC_NO_WATERMARK, Xiaotian Feng, (Tue Jul 13, 3:18 am)
[PATCH -mmotm 10/30] mm: __GFP_MEMALLOC, Xiaotian Feng, (Tue Jul 13, 3:18 am)
[PATCH -mmotm 11/30] mm: memory reserve management, Xiaotian Feng, (Tue Jul 13, 3:18 am)
[PATCH -mmotm 12/30] selinux: tag avc cache alloc as non-c ..., Xiaotian Feng, (Tue Jul 13, 3:19 am)
[PATCH -mmotm 13/30] net: packet split receive api, Xiaotian Feng, (Tue Jul 13, 3:19 am)
[PATCH -mmotm 16/30] netvm: INET reserves, Xiaotian Feng, (Tue Jul 13, 3:19 am)
[PATCH -mmotm 18/30] netvm: filter emergency skbs, Xiaotian Feng, (Tue Jul 13, 3:20 am)
[PATCH -mmotm 21/30] netvm: skb processing, Xiaotian Feng, (Tue Jul 13, 3:20 am)
[PATCH -mmotm 26/30] nfs: enable swap on NFS, Xiaotian Feng, (Tue Jul 13, 3:21 am)
[PATCH -mmotm 28/30] build fix for skb_emergency_protocol, Xiaotian Feng, (Tue Jul 13, 3:22 am)
Re: [PATCH -mmotm 00/30] [RFC] swap over nfs -v21, Américo Wang, (Tue Jul 13, 5:53 am)