From: Xiaotian Feng Date: Wed, 24 Feb 2010 10:39:02 +0000 (+0800) Subject: security: fix error return path in ima_inode_alloc X-Git-Tag: firefly_0821_release~9833^2~3119 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=baac35c4155a8aa826c70acee6553368ca5243a2;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Mimi Zohar Signed-off-by: James Morris --- diff --git a/security/integrity/ima/ima_iint.c b/security/integrity/ima/ima_iint.c index 0d83edcfc402..2d4d05d92fda 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; }