diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/integrity/ima/ima_init.c | 4 | ||||
-rw-r--r-- | security/integrity/ima/ima_main.c | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/security/integrity/ima/ima_init.c b/security/integrity/ima/ima_init.c index e8f9d70a465d..8cf0f39c8cd2 100644 --- a/security/integrity/ima/ima_init.c +++ b/security/integrity/ima/ima_init.c | |||
@@ -98,6 +98,10 @@ int __init ima_init(void) | |||
98 | if (!ima_used_chip) | 98 | if (!ima_used_chip) |
99 | pr_info("No TPM chip found, activating TPM-bypass!\n"); | 99 | pr_info("No TPM chip found, activating TPM-bypass!\n"); |
100 | 100 | ||
101 | rc = ima_init_keyring(INTEGRITY_KEYRING_IMA); | ||
102 | if (rc) | ||
103 | return rc; | ||
104 | |||
101 | rc = ima_init_crypto(); | 105 | rc = ima_init_crypto(); |
102 | if (rc) | 106 | if (rc) |
103 | return rc; | 107 | return rc; |
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 673a37e92ba3..ed7d9fa4f536 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c | |||
@@ -334,14 +334,8 @@ static int __init init_ima(void) | |||
334 | 334 | ||
335 | hash_setup(CONFIG_IMA_DEFAULT_HASH); | 335 | hash_setup(CONFIG_IMA_DEFAULT_HASH); |
336 | error = ima_init(); | 336 | error = ima_init(); |
337 | if (error) | 337 | if (!error) |
338 | goto out; | 338 | ima_initialized = 1; |
339 | |||
340 | error = ima_init_keyring(INTEGRITY_KEYRING_IMA); | ||
341 | if (error) | ||
342 | goto out; | ||
343 | ima_initialized = 1; | ||
344 | out: | ||
345 | return error; | 339 | return error; |
346 | } | 340 | } |
347 | 341 | ||