summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorDmitry Kasatkin <dmitry.kasatkin@intel.com>2012-06-25 12:18:11 +0300
committerMimi Zohar <zohar@linux.vnet.ibm.com>2012-07-05 16:43:57 -0400
commit7ff2267af595e642f1009198ab49e86a239148fa (patch)
treebd9187795ee24b4a339593caff40ea677e706e17 /security
parent8445d64dd761440fb5c73a2abba25009f4bf0e4c (diff)
downloadlinux-7ff2267af595e642f1009198ab49e86a239148fa.tar.gz
linux-7ff2267af595e642f1009198ab49e86a239148fa.tar.bz2
linux-7ff2267af595e642f1009198ab49e86a239148fa.zip
ima: ima_initialized is set only if successful
Set ima_initialized only if initialization was successful. Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/ima/ima_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index 5b0548d75561..be8294915cf7 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -258,7 +258,8 @@ static int __init init_ima(void)
int error;
error = ima_init();
- ima_initialized = 1;
+ if (!error)
+ ima_initialized = 1;
return error;
}