You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
security: fix error return path in ima_inode_alloc
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>
This commit is contained in:
committed by
James Morris
parent
60b341b778
commit
baac35c415
@@ -63,12 +63,11 @@ int ima_inode_alloc(struct inode *inode)
|
|||||||
spin_lock(&ima_iint_lock);
|
spin_lock(&ima_iint_lock);
|
||||||
rc = radix_tree_insert(&ima_iint_store, (unsigned long)inode, iint);
|
rc = radix_tree_insert(&ima_iint_store, (unsigned long)inode, iint);
|
||||||
spin_unlock(&ima_iint_lock);
|
spin_unlock(&ima_iint_lock);
|
||||||
|
radix_tree_preload_end();
|
||||||
out:
|
out:
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
kmem_cache_free(iint_cache, iint);
|
kmem_cache_free(iint_cache, iint);
|
||||||
|
|
||||||
radix_tree_preload_end();
|
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user