Skip to content

Commit

Permalink
security: fix error return path in ima_inode_alloc
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
Xiaotian Feng authored and James Morris committed Feb 24, 2010
1 parent 60b341b commit baac35c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions security/integrity/ima/ima_iint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit baac35c

Please sign in to comment.