diff options
author | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2009-02-21 01:28:29 +0300 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-02-23 01:54:53 +0300 |
commit | be38e0fd5f90a91d09e0a85ffb294b70a7be6259 (patch) | |
tree | 8e48b770e6c2012185fd68c0a1098991ad3c56cb /security | |
parent | 1581e7ddbdd97443a134e1a0cc9d81256baf77a4 (diff) | |
download | linux-be38e0fd5f90a91d09e0a85ffb294b70a7be6259.tar.xz |
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 <zohar@us.ibm.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/integrity/ima/ima_iint.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_iint.c b/security/integrity/ima/ima_iint.c index 1f035e8d29c7..ec79f1ee992c 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; } |