The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] security: fix error return path in ima_inode_alloc
@ 2010-02-24 10:39 Xiaotian Feng
  2010-02-24 15:41 ` Mimi Zohar
  0 siblings, 1 reply; 2+ messages in thread
From: Xiaotian Feng @ 2010-02-24 10:39 UTC (permalink / raw)
  To: linux-security-module
  Cc: linux-kernel, Xiaotian Feng, Mimi Zohar, James Morris, Eric Paris,
	Al Viro, Amit K. Arora

If radix_tree_preload is failed in ima_inode_alloc, we don't need
radix_tree_preload_end because kernel is alread preempt enabled

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Mimi Zohar <zohar@us.ibm.com>
Cc: James Morris <jmorris@namei.org>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Amit K. Arora <amitarora@in.ibm.com>
---
 security/integrity/ima/ima_iint.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/security/integrity/ima/ima_iint.c b/security/integrity/ima/ima_iint.c
index 0d83edc..2d4d05d 100644
--- a/security/integrity/ima/ima_iint.c
+++ b/security/integrity/ima/ima_iint.c
@@ -63,12 +63,11 @@ int ima_inode_alloc(struct inode *inode)
 	spin_lock(&ima_iint_lock);
 	rc = radix_tree_insert(&ima_iint_store, (unsigned long)inode, iint);
 	spin_unlock(&ima_iint_lock);
+	radix_tree_preload_end();
 out:
 	if (rc < 0)
 		kmem_cache_free(iint_cache, iint);
 
-	radix_tree_preload_end();
-
 	return rc;
 }
 
-- 
1.6.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-24 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-24 10:39 [PATCH] security: fix error return path in ima_inode_alloc Xiaotian Feng
2010-02-24 15:41 ` Mimi Zohar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox