From be38e0fd5f90a91d09e0a85ffb294b70a7be6259 Mon Sep 17 00:00:00 2001 From: Mimi Zohar Date: Fri, 20 Feb 2009 14:28:29 -0800 Subject: integrity: ima iint radix_tree_lookup locking fix Based on Andrew Morton's comments: - add missing locks around radix_tree_lookup in ima_iint_insert() Signed-off-by: Mimi Zohar Cc: James Morris Signed-off-by: Andrew Morton Signed-off-by: James Morris --- security/integrity/ima/ima_iint.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'security/integrity') diff --git a/security/integrity/ima/ima_iint.c b/security/integrity/ima/ima_iint.c index 1f035e8..ec79f1e 100644 --- a/security/integrity/ima/ima_iint.c +++ b/security/integrity/ima/ima_iint.c @@ -73,8 +73,10 @@ out: if (rc < 0) { kmem_cache_free(iint_cache, iint); if (rc == -EEXIST) { + spin_lock(&ima_iint_lock); iint = radix_tree_lookup(&ima_iint_store, (unsigned long)inode); + spin_unlock(&ima_iint_lock); } else iint = NULL; } -- cgit v1.1